Forum: JRuby 2.0: ARGV[0] Returns Something Even When It Should Be Empty

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
22db9ef38f6c2301ef7fd667f18874d2?d=identicon&s=25 Tom E Purl (Guest)
on 2009-04-02 22:38
(Received via mailing list)
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
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
an error.  I therefore printed the value of ARGV[0], and got the


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,


Tom Purl
Ede2aa10c6462f1d825143879be59e38?d=identicon&s=25 Charles Oliver Nutter (Guest)
on 2009-04-03 16:11
(Received via mailing list)
Tom E Purl wrote:
> by-the-way.
No, looks like you've found a bug in the argument parsing logic in our
.bat startup files. Could you file a bug, and if you know anything about
.bat scripts maybe you could help figure out what's wrong?

- Charlie

To unsubscribe from this list, please visit:
This topic is locked and can not be replied to.