Jruby on windows bug

C:\installs\jruby-1.4.0RC1\bin>jruby -v --server -e ‘1000000.times {}’
jruby 1.4.0RC2 (ruby 1.8.7 patchlevel 174) (2009-10-21 7e77f32) (Java
HotSpot™ Server VM 1.6.0_13) [x86-java]
:1: -e:2: unterminated string meets end of file (SyntaxError)

C:\installs\jruby-1.4.0RC1\bin>ruby -v -e ‘1000000.times {}’
ruby 1.8.6 (2009-03-31 patchlevel 368) [i386-mingw32]

C:\installs\jruby-1.4.0RC1\bin>

Thanks!
-r

Hi Roger,

This has been discussed on this list earlier today, take a look at the
mail exchange with subject “jruby -e?”

Essentially, this is Windows limitation/feature. You should use double
quotes at the top level.

jruby -e “1000.times {}”

Thanks,
–Vladimir

On Thu, Oct 22, 2009 at 5:47 PM, Roger P. [email protected]
wrote:

C:\installs\jruby-1.4.0RC1\bin>


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Essentially, this is Windows limitation/feature. You should use double
quotes at the top level.

Hate to push back, but since it works with MRI I’d expect it to with
jruby.
-r

Hi Roger,

On Fri, Oct 23, 2009 at 1:35 AM, Roger P. [email protected]
wrote:

Essentially, this is Windows limitation/feature. You should use double
quotes at the top level.

Hate to push back, but since it works with MRI I’d expect it to with
jruby.

Indeed, many people been bitten by this issue, and it is especially
confusing for newcomers to JRuby. When I first tried JRuby on windows
I also used single quotes and thought for a while that the command
line in JRuby just plain totally broken, until switched to double
quotes.

Please, file a bug in http://jira.codehaus.org/browse/JRUBY

Thanks,
–Vladimir


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Please, file a bug in http://jira.codehaus.org/browse/JRUBY

http://jira.codehaus.org/browse/JRUBY-4151

Hi Roger,

On Fri, Oct 23, 2009 at 6:48 PM, Roger P. [email protected]
wrote:

Please, file a bug in http://jira.codehaus.org/browse/JRUBY

http://jira.codehaus.org/browse/JRUBY-4151

Thanks! I took a quick look at MRI’s rb_win32_cmdvector(), which is
250(!) lines long, with two big loops, and it looks like MRI folks
do lots of extra magic with the command line parameters, including the
handling of single quote.

Thanks,
–Vladimir


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email