diff options
author | Xavier Noria <fxn@hashref.com> | 2011-03-09 18:51:15 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-03-09 18:51:54 +0100 |
commit | ebe4fa5fbe54cd0559c9e5e58d68326630cfb255 (patch) | |
tree | 33ac3a7393b9b3cf0bfcd262322a3fb821e87593 /activesupport | |
parent | 32b5c4b77a880b8a10c20402477a392f1465d0c9 (diff) | |
download | rails-ebe4fa5fbe54cd0559c9e5e58d68326630cfb255.tar.gz rails-ebe4fa5fbe54cd0559c9e5e58d68326630cfb255.tar.bz2 rails-ebe4fa5fbe54cd0559c9e5e58d68326630cfb255.zip |
move the conditional definition of Float#round down
Rails 3 cherry-picks as little as possible from Active Support. In particular
the framework requires the files where extensions are exactly defined, rather
than convenience entry points like float.rb and friends. Because of that, it
is better to define conditionally rather than require conditionally.
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/float.rb | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/core_ext/float/rounding.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/float.rb b/activesupport/lib/active_support/core_ext/float.rb index 4f6f606680..7570471b95 100644 --- a/activesupport/lib/active_support/core_ext/float.rb +++ b/activesupport/lib/active_support/core_ext/float.rb @@ -1 +1 @@ -require 'active_support/core_ext/float/rounding' if RUBY_VERSION < '1.9' +require 'active_support/core_ext/float/rounding' diff --git a/activesupport/lib/active_support/core_ext/float/rounding.rb b/activesupport/lib/active_support/core_ext/float/rounding.rb index 9bdf5bba7b..0d4fb87665 100644 --- a/activesupport/lib/active_support/core_ext/float/rounding.rb +++ b/activesupport/lib/active_support/core_ext/float/rounding.rb @@ -16,4 +16,4 @@ class Float precisionless_round end end -end +end if RUBY_VERSION < '1.9' |