ruby-changes:69686
From: Benoit <ko1@a...>
Date: Thu, 11 Nov 2021 03:52:48 +0900 (JST)
Subject: [ruby-changes:69686] 8d5f38a8a4 (master): Use Primitive. in timev.rb for consistency with all other .rb files
https://git.ruby-lang.org/ruby.git/commit/?id=8d5f38a8a4 From 8d5f38a8a43fd356da34d7881b5d0d1c6d115f1d Mon Sep 17 00:00:00 2001 From: Benoit Daloze <eregontp@g...> Date: Wed, 10 Nov 2021 19:50:38 +0100 Subject: Use Primitive. in timev.rb for consistency with all other .rb files --- timev.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/timev.rb b/timev.rb index 4d4204115d3..a475fc482df 100644 --- a/timev.rb +++ b/timev.rb @@ -221,7 +221,7 @@ class Time https://github.com/ruby/ruby/blob/trunk/timev.rb#L221 # Parameter: # :include: doc/time/in.rdoc def self.now(in: nil) - new(in: __builtin.arg!(:in)) + new(in: Primitive.arg!(:in)) end # _Time_ @@ -268,7 +268,7 @@ class Time https://github.com/ruby/ruby/blob/trunk/timev.rb#L268 # :include: doc/time/in.rdoc # def self.at(time, subsec = false, unit = :microsecond, in: nil) - __builtin.time_s_at(time, subsec, unit, __builtin.arg!(:in)) + Primitive.time_s_at(time, subsec, unit, Primitive.arg!(:in)) end # Returns a new \Time object based the on given arguments. @@ -292,17 +292,17 @@ class Time https://github.com/ruby/ruby/blob/trunk/timev.rb#L292 # def initialize(year = (now = true), mon = nil, mday = nil, hour = nil, min = nil, sec = nil, zone = nil, in: nil) if zone - if __builtin.arg!(:in) + if Primitive.arg!(:in) raise ArgumentError, "timezone argument given as positional and keyword arguments" end else - zone = __builtin.arg!(:in) + zone = Primitive.arg!(:in) end if now - return __builtin.time_init_now(zone) + return Primitive.time_init_now(zone) end - __builtin.time_init_args(year, mon, mday, hour, min, sec, zone) + Primitive.time_init_args(year, mon, mday, hour, min, sec, zone) end end -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/