aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2010-01-06 23:34:40 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2010-01-06 23:35:03 -0800
commit816ba1e15a709337a99a931e80dddfe5bf972de5 (patch)
treefcaa3e04d2b630a08b4c33203c89d5b468f608c7 /activesupport/lib
parent74f6ccea201d778e020f8c758013d90ea8a5c8a1 (diff)
downloadrails-816ba1e15a709337a99a931e80dddfe5bf972de5.tar.gz
rails-816ba1e15a709337a99a931e80dddfe5bf972de5.tar.bz2
rails-816ba1e15a709337a99a931e80dddfe5bf972de5.zip
Remove unneeded reliance on Numeric#round quirk
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/core_ext/float/rounding.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/float/rounding.rb b/activesupport/lib/active_support/core_ext/float/rounding.rb
index 0b1ae4be7e..9bdf5bba7b 100644
--- a/activesupport/lib/active_support/core_ext/float/rounding.rb
+++ b/activesupport/lib/active_support/core_ext/float/rounding.rb
@@ -1,5 +1,6 @@
class Float
- remove_method :round
+ alias precisionless_round round
+ private :precisionless_round
# Rounds the float with the specified precision.
#
@@ -12,7 +13,7 @@ class Float
magnitude = 10.0 ** precision
(self * magnitude).round / magnitude
else
- super()
+ precisionless_round
end
end
end