Thomas Dudziak created JRUBY-6263:
-------------------------------------

             Summary: RuntimeException when using Open3.capture2e with jruby 
1.6.5
                 Key: JRUBY-6263
                 URL: https://jira.codehaus.org/browse/JRUBY-6263
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.6.5
         Environment: MacOS X 10.7
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-383-11A511)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-383, mixed mode)
            Reporter: Thomas Dudziak
            Assignee: Thomas E Enebo


When running code like this:

{code:ruby}
require "open3"

output, status = Open3.capture2e("date")
{code}

in an IRB session in 1.9 mode, I get this output:

jruby-1.6.5 :001 > require "open3"
 => true 
jruby-1.6.5 :002 > output, status = Open3.capture2e("date")
Sat Dec 10 09:58:39 PST 2011
Java::JavaLang::RuntimeException: CallBlock does not have a static scope; this 
should not be called
        from org.jruby.runtime.CallBlock.getStaticScope(CallBlock.java:107)
        from org.jruby.RubyProc.setup(RubyProc.java:159)
        from org.jruby.RubyProc.newProc(RubyProc.java:118)
        from org.jruby.RubyProc.newProc(RubyProc.java:113)
        from org.jruby.Ruby.newProc(Ruby.java:2919)
        from 
org.jruby.internal.runtime.RubyRunnable.<init>(RubyRunnable.java:60)
        from org.jruby.RubyThread.initialize(RubyThread.java:269)
        from 
org.jruby.RubyThread$i$0$0$initialize.call(RubyThread$i$0$0$initialize.gen:65535)
        from org.jruby.RubyClass.finvoke(RubyClass.java:557)
        from 
org.jruby.javasupport.util.RuntimeHelpers.invoke(RuntimeHelpers.java:541)
        from org.jruby.RubyObject.callInit(RubyObject.java:233)
        from org.jruby.RubyThread.startThread(RubyThread.java:313)
        from org.jruby.RubyThread.newInstance(RubyThread.java:230)
        from org.jruby.RubyProcess.detach(RubyProcess.java:923)
        from 
org.jruby.RubyProcess$s$1$0$detach.call(RubyProcess$s$1$0$detach.gen:65535)
        from 
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:312)
... 160 levels...
        from 
org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
        from 
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:190)
        from 
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:179)
        from 
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:312)
        from 
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:169)
        from 
Users.tomdz.$_dot_rvm.rubies.jruby_minus_1_dot_6_dot_5.bin.irb.__file__(/Users/tomdz/.rvm/rubies/jruby-1.6.5/bin/irb:17)
        from 
Users.tomdz.$_dot_rvm.rubies.jruby_minus_1_dot_6_dot_5.bin.irb.load(/Users/tomdz/.rvm/rubies/jruby-1.6.5/bin/irb)
        from org.jruby.Ruby.runScript(Ruby.java:693)
        from org.jruby.Ruby.runScript(Ruby.java:686)
        from org.jruby.Ruby.runNormally(Ruby.java:593)
        from org.jruby.Ruby.runFromMain(Ruby.java:442)
        from org.jruby.Main.doRunFromMain(Main.java:321)
        from org.jruby.Main.internalRun(Main.java:241)
        from org.jruby.Main.run(Main.java:207)
        from org.jruby.Main.run(Main.java:191)
        from org.jruby.Main.main(Main.java:171)

Notice also how the command produces output on stdout even though capture2e is 
supposed to capture that output.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.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