I have trouble imagining that I’m the first person to find this, but I
couldn’t find anything about it on the mailing list. I have a script
that
checks command line arguments by inspecting the ARGV array. Here’s the
code I use:
raise “usage: jruby -S lssub.rb server_name” unless ARGV.length == 1
When I ran this with the 2.0 interpreter without an arg, it didn’t
raise
an error. I therefore printed the value of ARGV[0], and got the
following:
1.1.5/bin/jruby.bat.exe
Weird. Here’s what I get when I inspect my jruby version:
jruby 1.2.0 (ruby 1.8.6 patchlevel 287) (2009-03-16 rev 9419) [x86-java]
Also, I still have the 1.1.5 and 1.1.6 versions of Jruby installed, and
they behave in the expected way (throwing the exception above).
Am I doing something wrong, or is this a bug? I’m using Windows XP,
by-the-way.
Thanks!
Tom Purl