Skip to content

Commit

Permalink
[DOC] Use Rational literals than to_r in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed May 24, 2019
1 parent 1a4080c commit 45ad375
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions time.c
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 45ad375

Please sign in to comment.