ruby-changes:55815
From: Nobuyoshi <ko1@a...>
Date: Fri, 24 May 2019 16:15:48 +0900 (JST)
Subject: [ruby-changes:55815] Nobuyoshi Nakada: 45ad375acc (trunk): [DOC] Use Rational literals than to_r in examples
https://git.ruby-lang.org/ruby.git/commit/?id=45ad375acc From 45ad375acccca2bb0852613b1e809a7af556f5e6 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 24 May 2019 16:10:10 +0900 Subject: [DOC] Use Rational literals than to_r in examples diff --git a/time.c b/time.c index 99f6fe0..b569bf6 100644 --- a/time.c +++ b/time.c @@ -4184,7 +4184,7 @@ ndigits_denominator(VALUE ndigits) https://github.com/ruby/ruby/blob/trunk/time.c#L4184 * * 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) https://github.com/ruby/ruby/blob/trunk/time.c#L4236 * * 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) https://github.com/ruby/ruby/blob/trunk/time.c#L4283 * * 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" -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/