NPE forcing to compile a script
-------------------------------

                 Key: JRUBY-5322
                 URL: http://jira.codehaus.org/browse/JRUBY-5322
             Project: JRuby
          Issue Type: Bug
          Components: Compiler, Ruby 1.9
            Reporter: David Calavera


NPE raised if we force to compile a script with -X+C and --1.9, seems this 
commit was the cause:

https://github.com/jruby/jruby/commit/f2386db6ecf451ea20501615cc7a084cbd2106b8

{noformat}
$ bin/jruby -X+C --1.9 bis.rb
warning: could not compile; pass -d or -J-Djruby.jit.logging.verbose=true for 
more details
Error, could not compile; pass -J-Djruby.jit.logging.verbose=true for more 
details
org.jruby.exceptions.RaiseException: (LoadError) load error: rubygems -- 
java.lang.NullPointerException: null
        at org.jruby.RubyKernel.require19(org/jruby/RubyKernel.java:1050)
        at #<Class:0x140363068>.(root)(builtin/gem_prelude.rb:11)
Caused by: java.lang.NullPointerException
        at org.jruby.Ruby.runScript(Ruby.java:702)
        at org.jruby.Ruby.compileAndLoadFile(Ruby.java:2680)
        at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:54)
        at 
org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:748)
        at org.jruby.runtime.load.LoadService.smartLoad(LoadService.java:332)
        at org.jruby.runtime.load.LoadService.require(LoadService.java:379)
        at 
org.jruby.runtime.load.LoadService.lockAndRequire(LoadService.java:304)
        at org.jruby.RubyKernel.requireCommon(RubyKernel.java:1058)
        at org.jruby.RubyKernel.require19(RubyKernel.java:1050)
        at 
org.jruby.RubyKernel$s_method_1_0$RUBYINVOKER$require19.call(org/jruby/RubyKernel$s_method_1_0$RUBYINVOKER$require19.gen:65535)
        at 
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:319)
        at 
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:282)
        at 
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:139)
        at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:103)
        at org.jruby.ast.RootNode.interpret(RootNode.java:129)
        at 
org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:115)
        at org.jruby.Ruby.runInterpreter(Ruby.java:729)
        at org.jruby.Ruby.loadFile(Ruby.java:2609)
        at org.jruby.Ruby.initBuiltins(Ruby.java:1546)
        at org.jruby.Ruby.init(Ruby.java:1107)
        at org.jruby.Ruby.newInstance(Ruby.java:180)
        at org.jruby.Main.run(Main.java:234)
        at org.jruby.Main.run(Main.java:144)
        at org.jruby.Main.main(Main.java:113)
[exited with 1]
{noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

    http://xircles.codehaus.org/manage_email


Reply via email to