Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6.6, JRuby 1.6.7, JRuby 1.7.0.pre1
-
Fix Version/s: JRuby 1.7.0.pre1
-
Component/s: Core Classes/Modules
-
Labels:None
-
Environment:HideOS X Lion
jruby 1.6.6 (ruby-1.8.7-p357) (2012-01-30 5673572) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java]
jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java]
jruby 1.7.0.dev (ruby-1.9.3-p139) (2012-03-06 2ce4caf) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java]
ShowOS X Lion jruby 1.6.6 (ruby-1.8.7-p357) (2012-01-30 5673572) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java] jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java] jruby 1.7.0.dev (ruby-1.9.3-p139) (2012-03-06 2ce4caf) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java]
-
Number of attachments :
Description
Given the code:
require 'date' e = Date.parse '2907-07-22' require 'bigdecimal' b = BigDecimal.new '1.0' rd = e - Date.today s = b / rd
s is 3.05798240436925e-06 in MRI and JRuby --1.8 mode and nil in JRuby --1.9 mode.
Is this correct or is it a bug?
I cannot say what changed between 1.8 and 1.9 in MRI, but it will return an error in 1.9.3:
Assuming that is correct, then we should also be throwing a type error and not nil.