Issue Type: Bug Bug
Affects Versions: JRuby 1.7.4, JRuby 1.7.0
Assignee: Thomas E Enebo
Created: 03/Jun/13 11:16 AM
Description:

Running the following code causes a Java::JavaLang::NullPointerException in all JRuby installations I tried. It happens in irb, but not if you put the code in a file and run it from the command line.

Code
class A
  def b
  end
end

module M
  def b
    super
  end
end

class B < A
  include M.dup
end
B.new.b
Backtrace for OpenBSD-i386
Java::JavaLang::NullPointerException:
        from org.jruby.runtime.callsite.SuperCallSite.pollAndGetClass(SuperCallSite.java:455)
        from org.jruby.runtime.callsite.SuperCallSite.callBlock(SuperCallSite.java:140)
        from org.jruby.runtime.callsite.SuperCallSite.call(SuperCallSite.java:151)
        from org.jruby.runtime.callsite.SuperCallSite.callVarargs(SuperCallSite.java:107)
        from org.jruby.ast.ZSuperNode.interpret(ZSuperNode.java:103)
        from org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
        from org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
        from org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
        from org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:170)
        from org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:306)
        from org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:136)
        from org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60)
        from org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
        from org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
        from org.jruby.ast.RootNode.interpret(RootNode.java:129)
        from org.jruby.evaluator.ASTInterpreter.INTERPRET_EVAL(ASTInterpreter.java:95)
... 121 levels...
        from org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
        from org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
        from org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:182)
        from org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:186)
        from org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
        from org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
        from usr.local.jruby.bin.jirb.__file__(/usr/local/jruby/bin/jirb:13)
        from usr.local.jruby.bin.jirb.load(/usr/local/jruby/bin/jirb)
        from org.jruby.Ruby.runScript(Ruby.java:807)
        from org.jruby.Ruby.runScript(Ruby.java:800)
        from org.jruby.Ruby.runNormally(Ruby.java:669)
        from org.jruby.Ruby.runFromMain(Ruby.java:518)
        from org.jruby.Main.doRunFromMain(Main.java:390)
        from org.jruby.Main.internalRun(Main.java:279)
        from org.jruby.Main.run(Main.java:221)
        from org.jruby.Main.main(Main.java:201)
Environment: jruby 1.7.4 (1.9.3p392) 2013-05-16 fffffff on OpenJDK Server VM 1.7.0_17-b02 [OpenBSD-i386]
jruby 1.7.4 (1.9.3p392) 2013-05-21 fffffff on OpenJDK 64-Bit Server VM 1.7.0_17-b02 [OpenBSD-amd64]
jruby 1.7.0 (1.9.3p203) 2012-10-22 ff1ebbe on Java HotSpot(TM) Client VM 1.6.0_22-b04 [Windows XP-x86]
Project: JRuby
Priority: Major Major
Reporter: Jeremy Evans
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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