Forum: JRuby regression bug with jruby-1.2rc1

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7ece60b3b5bb235d1b6df89727ca6cf7?d=identicon&s=25 Diamantini Maurice (Guest)
on 2009-03-04 17:51
(Received via mailing list)
Bonjour à tous,

An amazing bug occurs with jruby-1.2rc1 (and not with jruby-1.1.6).

Let the first line of a script be the standard shebang;

     #!/bin/env jruby

If this first line contains one **and only one** white space at the end,
then a java error occurs immediately:

Shared archive: sharing disabled for server vm
String.java:558:in `charAt':
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
  from RubyInstanceConfig.java:745:in `isInterpreterArgument'
  from RubyInstanceConfig.java:707:in `processArguments'
  from RubyInstanceConfig.java:516:in `processArguments'
  from Main.java:197:in `run'
  from Main.java:110:in `run'
  from Main.java:94:in `main'

This error arises either if the script is called as an unix command
thanks to the shebang, or directly as an argument to the jruby
command.

Cordialement,
-- Maurice


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
526d60de6472502bb570a9df2842b33b?d=identicon&s=25 Nick Sieger (Guest)
on 2009-03-04 18:35
(Received via mailing list)
On Wed, Mar 4, 2009 at 10:50 AM, Diamantini Maurice
<maurice.diamantini@gmail.com> wrote:
>
> This error arises either if the script is called as an unix command
> thanks to the shebang, or directly as an argument to the jruby
> command.

Wow, very nice. Could you please file a bug [1]? It sounds like it
shouldn't be tricky to fix, and obviously the workaround is trivial
too.

Cheers,
/Nick

[1]: http://jira.codehaus.org/browse/JRUBY

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
7ece60b3b5bb235d1b6df89727ca6cf7?d=identicon&s=25 Diamantini Maurice (Guest)
on 2009-03-05 10:31
(Received via mailing list)
Le 4 mars 09 à 18:34, Nick Sieger a écrit :
> Wow, very nice. Could you please file a bug [1]? It sounds like it
> shouldn't be tricky to fix, and obviously the workaround is trivial
> too.

Done : http://jira.codehaus.org/browse/JRUBY-3467
-- Maurice

> Cheers,
> /Nick
>
> [1]: http://jira.codehaus.org/browse/JRUBY


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
This topic is locked and can not be replied to.