From ebe4fa5fbe54cd0559c9e5e58d68326630cfb255 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Wed, 9 Mar 2011 18:51:15 +0100 Subject: 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. --- activesupport/lib/active_support/core_ext/float.rb | 2 +- activesupport/lib/active_support/core_ext/float/rounding.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport/lib/active_support') 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' -- cgit v1.2.3