Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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.
  • Loading branch information...
commit ebe4fa5fbe54cd0559c9e5e58d68326630cfb255 1 parent 32b5c4b
@fxn fxn authored
View
2  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'
View
2  activesupport/lib/active_support/core_ext/float/rounding.rb
@@ -16,4 +16,4 @@ def round(precision = nil)
precisionless_round
end
end
-end
+end if RUBY_VERSION < '1.9'

1 comment on commit ebe4fa5

@dre3k

Thanks for explanation.

Please sign in to comment.
Something went wrong with that request. Please try again.