mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[DOC] Use Rational literals than to_r in examples
This commit is contained in:
parent
1a4080cb0a
commit
45ad375acc
1 changed files with 3 additions and 3 deletions
6
time.c
6
time.c
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue