Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.5.5, JRuby 1.5.6
    • Fix Version/s: JRuby 1.6RC2
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      gem list | grep rspec:

      rspec (2.3.0)
      rspec-core (2.3.1)
      rspec-expectations (2.3.0)
      rspec-mocks (2.3.0)
      rspec-rails (2.3.1)
      

      npe.rb:

      describe true do
        around(:each) do |example|
          example.run
        end
      
        it "is true" do
          true.should be_true
        end
      end
      

      rspec npe.rb:

      F
      
      Failures:
      
        1) true is true
           Failure/Error: Unable to find matching line from backtrace
      /Users/jfire/.rvm/gems/jruby-1.5.6/gems/rspec-core-2.3.1/lib/rspec/core/formatters/base_text_formatter.rb:150:in `dump_failure': private method `split' called for nil:NilClass (NoMethodError)
      	from /Users/jfire/.rvm/gems/jruby-1.5.6/gems/rspec-core-2.3.1/lib/rspec/core/formatters/base_text_formatter.rb:19:in `dump_failures'
      	from /Users/jfire/.rvm/gems/jruby-1.5.6/gems/rspec-core-2.3.1/lib/rspec/core/formatters/base_text_formatter.rb:17:in `each'
      	from /Users/jfire/.rvm/gems/jruby-1.5.6/gems/rspec-core-2.3.1/lib/rspec/core/formatters/base_text_formatter.rb:17:in `each_with_index'
      	from /Users/jfire/.rvm/gems/jruby-1.5.6/gems/rspec-core-2.3.1/lib/rspec/core/formatters/base_text_formatter.rb:17:in `dump_failures'
      	from /Users/jfire/.rvm/gems/jruby-1.5.6/gems/rspec-core-2.3.1/lib/rspec/core/reporter.rb:75:in `notify'
      	from /Users/jfire/.rvm/gems/jruby-1.5.6/gems/rspec-core-2.3.1/lib/rspec/core/reporter.rb:74:in `each'
      	from /Users/jfire/.rvm/gems/jruby-1.5.6/gems/rspec-core-2.3.1/lib/rspec/core/reporter.rb:74:in `notify'
      	from /Users/jfire/.rvm/gems/jruby-1.5.6/gems/rspec-core-2.3.1/lib/rspec/core/reporter.rb:23:in `conclude'
      	from /Users/jfire/.rvm/gems/jruby-1.5.6/gems/rspec-core-2.3.1/lib/rspec/core/reporter.rb:14:in `report'
      	from /Users/jfire/.rvm/gems/jruby-1.5.6/gems/rspec-core-2.3.1/lib/rspec/core/command_line.rb:24:in `run'
      	from /Users/jfire/.rvm/gems/jruby-1.5.6/gems/rspec-core-2.3.1/lib/rspec/core/runner.rb:55:in `run_in_process'
      	from /Users/jfire/.rvm/gems/jruby-1.5.6/gems/rspec-core-2.3.1/lib/rspec/core/runner.rb:46:in `run'
      	from /Users/jfire/.rvm/gems/jruby-1.5.6/gems/rspec-core-2.3.1/lib/rspec/core/runner.rb:10:in `autorun'
      	from :1
      

      If you debug this, you'll find that the exception that the formatter is trying to dump is a NPE with the following stack trace:

      org.jruby.runtime.Block.cloneBlock(Block.java:226)
      org.jruby.RubyProc.call(RubyProc.java:218)
      org.jruby.RubyProc.call(RubyProc.java:203)
      sun.reflect.GeneratedMethodAccessor128.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.jruby.internal.runtime.methods.ReflectedJavaMethod.call(ReflectedJavaMethod.java:150)
      org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:182)
      org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:178)
      org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:289)
      org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:108)
      org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.ast.IfNode.interpret(IfNode.java:119)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:160)
      org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:299)
      org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:117)
      org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:132)
      org.jruby.ast.FCallNoArgBlockNode.interpret(FCallNoArgBlockNode.java:32)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:373)
      org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:294)
      org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:228)
      org.jruby.runtime.Block.yieldSpecific(Block.java:99)
      org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:25)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
      org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:373)
      org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:346)
      org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303)
      org.jruby.runtime.Block.yield(Block.java:194)
      org.jruby.RubyContinuation.enter(RubyContinuation.java:106)
      org.jruby.RubyKernel.rbCatch(RubyKernel.java:1093)
      sun.reflect.GeneratedMethodAccessor154.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.jruby.internal.runtime.methods.ReflectedJavaMethod.call(ReflectedJavaMethod.java:148)
      org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:190)
      org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:319)
      org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:157)
      org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:172)
      org.jruby.ast.FCallOneArgBlockNode.interpret(FCallOneArgBlockNode.java:34)
      org.jruby.ast.InstAsgnNode.interpret(InstAsgnNode.java:95)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:160)
      org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:299)
      org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:117)
      org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:132)
      org.jruby.ast.FCallNoArgBlockNode.interpret(FCallNoArgBlockNode.java:32)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.ast.IfNode.interpret(IfNode.java:119)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.ast.RescueNode.executeBody(RescueNode.java:199)
      org.jruby.ast.RescueNode.interpretWithJavaExceptions(RescueNode.java:118)
      org.jruby.ast.RescueNode.interpret(RescueNode.java:110)
      org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
      org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
      org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:221)
      org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)
      org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:188)
      org.jruby.ast.CallTwoArgNode.interpret(CallTwoArgNode.java:59)
      org.jruby.ast.DAsgnNode.interpret(DAsgnNode.java:110)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
      org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:373)
      org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:346)
      org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303)
      org.jruby.runtime.Block.yield(Block.java:194)
      org.jruby.RubyArray.collect(RubyArray.java:2354)
      sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.jruby.internal.runtime.methods.ReflectedJavaMethod.call(ReflectedJavaMethod.java:150)
      org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:182)
      org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:115)
      org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:122)
      org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)
      org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:180)
      org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:309)
      org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:148)
      org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
      org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
      org.jruby.ast.RescueNode.executeBody(RescueNode.java:199)
      org.jruby.ast.RescueNode.interpretWithJavaExceptions(RescueNode.java:118)
      org.jruby.ast.RescueNode.interpret(RescueNode.java:110)
      org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
      org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
      org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:180)
      org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:309)
      org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:148)
      org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:373)
      org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:346)
      org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303)
      org.jruby.runtime.Block.yield(Block.java:194)
      org.jruby.RubyArray.collect(RubyArray.java:2354)
      sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.jruby.internal.runtime.methods.ReflectedJavaMethod.call(ReflectedJavaMethod.java:150)
      org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:182)
      org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:115)
      org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:122)
      org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)
      org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)
      org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
      org.jruby.ast.RescueNode.executeBody(RescueNode.java:199)
      org.jruby.ast.RescueNode.interpretWithJavaExceptions(RescueNode.java:118)
      org.jruby.ast.RescueNode.interpret(RescueNode.java:110)
      org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
      org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
      org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:180)
      org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:309)
      org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:148)
      org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:373)
      org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:346)
      org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303)
      org.jruby.runtime.Block.yield(Block.java:194)
      org.jruby.RubyArray.collect(RubyArray.java:2354)
      sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.jruby.internal.runtime.methods.ReflectedJavaMethod.call(ReflectedJavaMethod.java:150)
      org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:182)
      org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:299)
      org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:117)
      org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:122)
      org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)
      org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)
      org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
      org.jruby.ast.RescueNode.executeBody(RescueNode.java:199)
      org.jruby.ast.RescueNode.interpretWithJavaExceptions(RescueNode.java:118)
      org.jruby.ast.RescueNode.interpret(RescueNode.java:110)
      org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
      org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
      org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:180)
      org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:309)
      org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:148)
      org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:373)
      org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:346)
      org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303)
      org.jruby.runtime.Block.yield(Block.java:194)
      org.jruby.RubyArray.collect(RubyArray.java:2354)
      sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.jruby.internal.runtime.methods.ReflectedJavaMethod.call(ReflectedJavaMethod.java:150)
      org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:182)
      org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:299)
      org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:117)
      org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:122)
      org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)
      org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
      org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
      org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:373)
      org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:346)
      org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303)
      org.jruby.runtime.Block.yield(Block.java:194)
      org.jruby.ast.YieldNode.interpret(YieldNode.java:112)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
      org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
      org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:201)
      org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:319)
      org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:157)
      org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:162)
      org.jruby.ast.CallOneArgBlockNode.interpret(CallOneArgBlockNode.java:60)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
      org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:221)
      org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)
      org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:188)
      org.jruby.ast.CallTwoArgNode.interpret(CallTwoArgNode.java:59)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:262)
      org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:349)
      org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:228)
      org.jruby.ast.FCallThreeArgNode.interpret(FCallThreeArgNode.java:40)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.ast.IfNode.interpret(IfNode.java:119)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
      org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:262)
      org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:349)
      org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:228)
      org.jruby.ast.FCallThreeArgNode.interpret(FCallThreeArgNode.java:40)
      org.jruby.ast.IfNode.interpret(IfNode.java:111)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:373)
      org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:327)
      org.jruby.runtime.BlockBody.call(BlockBody.java:78)
      org.jruby.runtime.Block.call(Block.java:89)
      org.jruby.RubyProc.call(RubyProc.java:224)
      org.jruby.RubyProc.call(RubyProc.java:207)
      org.jruby.Ruby.tearDown(Ruby.java:2808)
      org.jruby.Ruby.tearDown(Ruby.java:2795)
      org.jruby.debug.Debugger.stop(Debugger.java:105)
      org.jruby.debug.Debugger.load(Debugger.java:139)
      org.jruby.debug.RubyDebugger.debug_load(RubyDebugger.java:207)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.jruby.internal.runtime.methods.ReflectedJavaMethod.call(ReflectedJavaMethod.java:148)
      org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
      org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:202)
      org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:349)
      org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:228)
      org.jruby.ast.FCallThreeArgNode.interpret(FCallThreeArgNode.java:40)
      org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
      org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:180)
      org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:309)
      org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:148)
      org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
      org.jruby.ast.RootNode.interpret(RootNode.java:129)
      org.jruby.Ruby.loadFile(Ruby.java:2551)
      org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:61)
      org.jruby.runtime.load.LoadService.load(LoadService.java:255)
      org.jruby.RubyKernel.loadCommon(RubyKernel.java:1010)
      org.jruby.RubyKernel.load(RubyKernel.java:992)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.jruby.internal.runtime.methods.ReflectedJavaMethod.call(ReflectedJavaMethod.java:148)
      org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:190)
      org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:186)
      org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:309)
      org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:148)
      org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
      org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
      org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
      org.jruby.ast.RootNode.interpret(RootNode.java:129)
      org.jruby.Ruby.runInterpreter(Ruby.java:716)
      org.jruby.Ruby.runNormally(Ruby.java:577)
      org.jruby.Ruby.runFromMain(Ruby.java:416)
      org.jruby.Main.run(Main.java:286)
      org.jruby.Main.run(Main.java:128)
      org.jruby.Main.main(Main.java:97)
      

      This is originally thrown from around rspec/code/example_group.rb:182. That's about as far as I could get with it.

        Activity

        Hide
        John Firebaugh added a comment -

        Unfortunately, the change to RSpec fixes the problem on 1.6 but triggers another bug on 1.5.6.

        
        class Procsy < Proc
          attr_reader :foo
          def initialize(foo)
            @foo = foo
          end
        end
        
        def procsy(&block)
          Procsy.new("foo", &block)
        end
        
        puts procsy { "hello" }.foo
        

        Output should be "foo", but 1.5.6 triggers "undefined method `foo' for #<Proc:0x15b0e2c@scratch/proc_new.rb:12> (NoMethodError)"

        Show
        John Firebaugh added a comment - Unfortunately, the change to RSpec fixes the problem on 1.6 but triggers another bug on 1.5.6. class Procsy < Proc attr_reader :foo def initialize(foo) @foo = foo end end def procsy(&block) Procsy. new ( "foo" , &block) end puts procsy { "hello" }.foo Output should be "foo", but 1.5.6 triggers "undefined method `foo' for #<Proc:0x15b0e2c@scratch/proc_new.rb:12> (NoMethodError)"
        Hide
        John Firebaugh added a comment -

        Looks like that's probably JRUBY-5026.

        Show
        John Firebaugh added a comment - Looks like that's probably JRUBY-5026 .
        Hide
        David Chelimsky added a comment -

        This means that RSpec has to load different code for JRuby >= 1.6 and < 1.6.

        Any chance 5026 would get back-ported to the 1.5 series? If not, how do you recommend RSpec tests for the version?

        Show
        David Chelimsky added a comment - This means that RSpec has to load different code for JRuby >= 1.6 and < 1.6. Any chance 5026 would get back-ported to the 1.5 series? If not, how do you recommend RSpec tests for the version?
        Hide
        Hiro Asari added a comment -

        David,

        There is no plan for another 1.5.x release. (It could change, but I won't bet on it.)

        You can look at the constant JRUBY_VERSION for the JRuby version at run-time.

        Show
        Hiro Asari added a comment - David, There is no plan for another 1.5.x release. (It could change, but I won't bet on it.) You can look at the constant JRUBY_VERSION for the JRuby version at run-time.
        Hide
        David Chelimsky added a comment -

        Thanks Hiro. I implemented it a bit differently after a suggestion from John Firebaugh, so don't need to switch on JRuby versions.

        Show
        David Chelimsky added a comment - Thanks Hiro. I implemented it a bit differently after a suggestion from John Firebaugh, so don't need to switch on JRuby versions.

          People

          • Assignee:
            Charles Oliver Nutter
            Reporter:
            John Firebaugh
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: