File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1300,7 +1300,7 @@ def program_name
1300
1300
private def strip_ext ( name ) # :nodoc:
1301
1301
exts = /#{
1302
1302
require "rbconfig"
1303
- Regexp . union ( RbConfig ::CONFIG [ "EXECUTABLE_EXTS" ] )
1303
+ Regexp . union ( * RbConfig ::CONFIG [ "EXECUTABLE_EXTS" ] &. split ( " " ) )
1304
1304
} \z /o
1305
1305
name . sub ( exts , "" )
1306
1306
end
Original file line number Diff line number Diff line change @@ -221,7 +221,7 @@ def test_program_name
221
221
program = $0
222
222
$0 = "rdbg3.5"
223
223
assert_equal "rdbg3.5" , OptionParser . new . program_name
224
- RbConfig ::CONFIG [ "EXECUTABLE_EXTS" ] . split ( " " ) do |ext |
224
+ RbConfig ::CONFIG [ "EXECUTABLE_EXTS" ] & .split ( " " ) do |ext |
225
225
$0 = "rdbg3.5" + ext
226
226
assert_equal "rdbg3.5" , OptionParser . new . program_name
227
227
end
You can’t perform that action at this time.
0 commit comments