Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't require jars with leading underscores #1006

Closed
phs opened this Issue Sep 11, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@phs
Copy link
Contributor

phs commented Sep 11, 2013

It looks like requiring jars whose name begins with a _ causes a stack trace. This doesn't affect similarly named rb files:

$ ls _alphabetically_early.rb _alphabetically_early.jar
_alphabetically_early.jar _alphabetically_early.rb
$ irb
>> JRUBY_VERSION
=> "1.7.4"
>> JRUBY_REVISION
=> "2390d3b"
>> require './_alphabetically_early.rb'
=> true
>> require './_alphabetically_early.jar'
LoadError: Exception loading extension `..`: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
    from org/jruby/RubyKernel.java:1054:in `require'
    from /usr/local/var/rbenv/versions/jruby-1.7.4/lib/ruby/shared/rubygems/custom_require.rb:36:in `require'
    from (irb):4:in `evaluate'
    from org/jruby/RubyKernel.java:1093:in `eval'
    from org/jruby/RubyKernel.java:1489:in `loop'
    from org/jruby/RubyKernel.java:1254:in `catch'
    from org/jruby/RubyKernel.java:1254:in `catch'
    from /usr/local/var/rbenv/versions/jruby-1.7.4/bin/irb:13:in `(root)'
>>
$ java -version
java version "1.7.0_12-ea"
Java(TM) SE Runtime Environment (build 1.7.0_12-ea-b08)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b28, mixed mode)
$ uname -a
Darwin holmes.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64
@BanzaiMan

This comment has been minimized.

Copy link
Member

BanzaiMan commented Sep 11, 2013

@BanzaiMan

This comment has been minimized.

Copy link
Member

BanzaiMan commented Sep 11, 2013

JAR with two consecutive underscores would fail to load, too.

@BanzaiMan BanzaiMan closed this in f84e7db Sep 11, 2013

@ghost ghost assigned BanzaiMan Sep 11, 2013

BanzaiMan added a commit that referenced this issue Sep 11, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.