Issue Type: Bug Bug
Affects Versions: JRuby 1.7.0.pre1
Assignee: Unassigned
Components: Java Integration
Created: 03/Aug/12 6:57 AM
Description:

I'm really sorry as this is going to be pretty vague, I tried to narrow things down but have been only able to spot the failure while running with RSpec (2.11 version seems to not matter that much as far as I tried).

seems as a regression to me as things work well with jruby 1.6.7 (1.8 and 1.9 as well) but not with jruby-head, here's a piece of code :

require 'rhino'

begin 
  raise Rhino::Ruby::Exception.new(42)
rescue java.lang.Exception => e
  puts "rescued exception class name: #{e.class.name}"
  puts "is is a Rhino::Ruby::Exception ? #{e.is_a?(Rhino::Ruby::Exception)}"
end

now pasting this into an irb seems to work, but not when in a spec :

git clone git://github.com/cowboyd/therubyrhino.git
bundle install
bundle exec rspec spec/rhino/ruby_spec.rb -e Exception
should end up with a failure :

  1) Rhino::Ruby::Exception outcomes as ruby errors in function calls
     Failure/Error: e.should be_a(Rhino::Ruby::Exception)
       expected org.jruby.proxy.org.mozilla._javascript_._javascript_Exception$Proxy2: [object Fixnum] to be a kind of Rhino::Ruby::Exception
     # ./spec/rhino/ruby_spec.rb:413:in `(root)'

spec is a little more complicated but replacing the highlighted line with the above code fails as well (note again it passes all fine with 1.6.7) :

begin
      raise Rhino::Ruby::Exception.new(42)
    rescue java.lang.Exception => e
      e.should be_a(Rhino::Ruby::Exception)
      # ...
Environment: jruby 1.7.0.preview2.dev (ruby-1.9.3-p203) (2012-08-01 5fe8b45) (Java HotSpot(TM) Server VM 1.6.0_32) [linux-i386-java]
Project: JRuby
Priority: Major Major
Reporter: Karol Bucek
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