Actions
Bug #3075
closedInteger gets turned into Float in Rational
Status:
Third Party's Issue
Assignee:
-
ruby -v:
ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-darwin9.7.0]
Description
=begin
This bug is as weird as the subject sounds:
I'm sorry it uses a method from activesupport, I couldn't trigger the bug without activesupport, yet because it seems to do this weird object magic trick in between method calls I think it has to do something with ruby.
I hope this makes sense to you,
Greetings, Tinco
=end
Updated by d-snp (Tinco Andringa) over 14 years ago
=begin
I figured it out. Since the Duration object responds to .kind_of? Integer it gets turned into a rational, and then the function is recursed. Because @numerator is a Bignum and a.numerator a Duration, coerce gets called, and both are turned into floats. Duration should've overrode coerce, the problem lies with active_support so this ticket can be closed.
=end
Updated by marcandre (Marc-Andre Lafortune) over 14 years ago
- Status changed from Open to Third Party's Issue
=begin
=end
Actions
Like0
Like0Like0