mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
refactor: use inline conditional for build config path assignment
Suggested by Gemini code assistant for better readability.
This commit is contained in:
+3
-3
@@ -60,10 +60,10 @@ module MRuby
|
||||
def mruby_config_path
|
||||
path = ENV['MRUBY_CONFIG'] || ENV['CONFIG']
|
||||
if path.nil? || path.empty?
|
||||
if Dir.pwd != MRUBY_ROOT && File.file?("./build_config.rb")
|
||||
path = "./build_config.rb"
|
||||
path = if Dir.pwd != MRUBY_ROOT && File.file?("./build_config.rb")
|
||||
"./build_config.rb"
|
||||
else
|
||||
path = "#{MRUBY_ROOT}/build_config/default.rb"
|
||||
"#{MRUBY_ROOT}/build_config/default.rb"
|
||||
end
|
||||
elsif !File.file?(path) && !Pathname.new(path).absolute?
|
||||
f = "#{MRUBY_ROOT}/build_config/#{path}.rb"
|
||||
|
||||
Reference in New Issue
Block a user