[ruby/optparse] JRuby does not have EXECUTABLE_EXTS in RbConfg::CONFIG

15b2f00b6b
This commit is contained in:
Nobuyoshi Nakada 2025-06-29 16:50:09 +09:00 committed by git
parent 259b0233d8
commit 9598ed9d1c
2 changed files with 2 additions and 2 deletions

View file

@ -221,7 +221,7 @@ class TestOptionParser < Test::Unit::TestCase
program = $0
$0 = "rdbg3.5"
assert_equal "rdbg3.5", OptionParser.new.program_name
RbConfig::CONFIG["EXECUTABLE_EXTS"].split(" ") do |ext|
RbConfig::CONFIG["EXECUTABLE_EXTS"]&.split(" ") do |ext|
$0 = "rdbg3.5" + ext
assert_equal "rdbg3.5", OptionParser.new.program_name
end