Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: JRuby 1.7.0.pre2
-
Component/s: None
-
Labels:None
-
Environment:Hide[aaron@mobile-166-129-172-191 psych (jruby)]$ ~/git/jruby/bin/jruby -v
jruby 1.7.0.preview2.dev (ruby-1.9.3-p203) (2012-07-18 4b0f333) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_33) [darwin-x86_64-java]Show[ aaron@mobile-166-129-172-191 psych (jruby)]$ ~/git/jruby/bin/jruby -v jruby 1.7.0.preview2.dev (ruby-1.9.3-p203) (2012-07-18 4b0f333) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_33) [darwin-x86_64-java]
-
Testcase included:yes
-
Number of attachments :
Description
When I open the singleton for an exception instance and define a method, it changes the inspect and equal properties.
I've attached a test case that demonstrates the problem. The test passes on MRI 1.9, but fails on JRuby.
Pretty simple one.
commit 34783fa45511fc81a5d598ba8af9fae89dd73a00 Author: Charles Oliver Nutter <headius@headius.com> Date: Fri Jul 20 16:29:32 2012 -0500 Fix for JRUBY-6786 opening the singleton class of an exception breaks equal and inspect We need to skip singletons for == and inspect on exceptions. :100644 100644 3a79e2c... 96cccc2... M src/org/jruby/RubyException.java