Project

General

Profile

Misc #10809 » revert_to_original_methods.patch

gogotanaka (Kazuki Tanaka), 02/01/2015 04:56 AM

View differences:

test/ruby/test_math.rb
check(Math.exp(1._to_f), Math.exp(0))
check(Math.log(1._to_f), Math.log(0))
Fixnum.class_eval do
def to_f
_to_f
end
end
Fixnum.class_eval 'alias to_f _to_f'
end
def test_override_bignum_to_f
......
check(Math.cos((1 << 63)._to_f), Math.cos(1 << 62))
check(Math.log((1 << 63)._to_f), Math.log(1 << 62))
Bignum.class_eval do
def to_f
_to_f
end
end
Bignum.class_eval 'alias to_f _to_f'
end
end
-
(4-4/5)