diff options
author | Nobuyoshi Nakada <[email protected]> | 2019-05-24 16:10:10 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2019-05-24 16:10:10 +0900 |
commit | 45ad375acccca2bb0852613b1e809a7af556f5e6 (patch) | |
tree | b2404b36df8162d65260dea83a8f21ccc493419f /time.c | |
parent | 1a4080cb0ade6c700ce763d4290e5b56635d1bc8 (diff) |
[DOC] Use Rational literals than to_r in examples
Diffstat (limited to 'time.c')
-rw-r--r-- | time.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -4184,7 +4184,7 @@ ndigits_denominator(VALUE ndigits) * * require 'time' * - * t = Time.utc(2010,3,30, 5,43,"25.123456789".to_r) + * t = Time.utc(2010,3,30, 5,43,25.123456789r) * t.iso8601(10) #=> "2010-03-30T05:43:25.1234567890Z" * t.round.iso8601(10) #=> "2010-03-30T05:43:25.0000000000Z" * t.round(0).iso8601(10) #=> "2010-03-30T05:43:25.0000000000Z" @@ -4236,7 +4236,7 @@ time_round(int argc, VALUE *argv, VALUE time) * * require 'time' * - * t = Time.utc(2010,3,30, 5,43,"25.123456789".to_r) + * t = Time.utc(2010,3,30, 5,43,25.123456789r) * t.iso8601(10) #=> "2010-03-30T05:43:25.1234567890Z" * t.floor.iso8601(10) #=> "2010-03-30T05:43:25.0000000000Z" * t.floor(0).iso8601(10) #=> "2010-03-30T05:43:25.0000000000Z" @@ -4283,7 +4283,7 @@ time_floor(int argc, VALUE *argv, VALUE time) * * require 'time' * - * t = Time.utc(2010,3,30, 5,43,"25.0123456789".to_r) + * t = Time.utc(2010,3,30, 5,43,25.0123456789r) * t.iso8601(10) #=> "2010-03-30T05:43:25.0123456789Z" * t.ceil.iso8601(10) #=> "2010-03-30T05:43:26.0000000000Z" * t.ceil(0).iso8601(10) #=> "2010-03-30T05:43:26.0000000000Z" |