Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.5
-
Fix Version/s: None
-
Component/s: Launcher
-
Labels:None
-
Environment:Windows, jruby-launcher (tree:b774fec/2010-03-01)
-
Testcase included:yes
-
Number of attachments :
Description
-r and -I options allow optional white spaces. But JRUBY-4611 fix has new bug.
jruby.exe -r bar -J-verbose foo.rb
generates
jruby: unknown option -J-verbose
In contrast, the following commands work.
jruby.exe -r bar foo.rb
jruby.exe -J-verbose -r bar foo.rb
The following commands work, of course.
jruby.exe -rbar -J-verbose foo.rb
jruby.exe -J-verbsee -rbar foo.rb
jruby.exe -rbar foo.rb
The fix stops scanning for options from 'bar' because 'bar' does not start with '-', and jruby does not recognize JVM option -J.
Not sure how to handle that without teaching JRuby launcher all ruby command line options though... Well, oun bash launcher does try to be a bit more clever than native launcher and recognizes some of the typical ruby options and knows when they allow optional white space. Probably we should do the same for native launcher.
For now, as a rule of thumb: always specify JVM options at the beginning.