JRuby returns different (or no) information from Exception#backtrace
--------------------------------------------------------------------

                 Key: JRUBY-1097
                 URL: http://jira.codehaus.org/browse/JRUBY-1097
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.0.0RC3
         Environment: OS X 10.4.9, Java 1.5, 2007-06-03 rev 3812
            Reporter: Daniel Berger


JRuby returns an empty array for backtrace information in jirb:
{noformat}
# MRI/irb
irb(main):001:0> begin; 1/0; rescue Exception => err; end
=> #<ZeroDivisionError: divided by 0>
irb(main):002:0> err.backtrace
=> ["(irb):1:in `/'", "(irb):1:in `irb_binding'", 
"/usr/local/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding'", 
"/usr/local/lib/ruby/1.8/irb/workspace.rb:52"]

# JRuby/jirb
irb(main):001:0> begin; 1/0; rescue Exception => err; end
=> #<ZeroDivisionError: divided by 0>
irb(main):002:0> err.backtrace
=> []
{noformat}
When I ran this program standalone, I got weird information back:
{noformat}
# Program
begin; 1/0; rescue Exception => err; end
p err.backtrace

# MRI results
["backtrace.rb:1:in `/'", "backtrace.rb:1"]

# JRuby results
[":-1"]
{noformat}
I could have sworn that JRuby returned the correct information at least once, 
but now it always returns [":-1"]. Odd.

-- 
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