aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/core_ext/time/calculations.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/time/calculations.rb b/activesupport/lib/active_support/core_ext/time/calculations.rb
index 9c019e10b5..b755726db2 100644
--- a/activesupport/lib/active_support/core_ext/time/calculations.rb
+++ b/activesupport/lib/active_support/core_ext/time/calculations.rb
@@ -75,9 +75,9 @@ class Time
# Returns the fraction of a second as a +Rational+
#
- # Time.new(2012, 8, 29, 0, 0, 0.5).sec_fraction # => (1/2)
+ # Time.new(2012, 8, 29, 0, 0, 0.5).sec_fraction # => (1/2)
def sec_fraction
- Rational(nsec, 1000000000)
+ subsec
end
# Returns a new Time where one or more of the elements have been changed according