Shrink timev.rb iseq size

This commit is contained in:
Nobuyoshi Nakada 2021-05-08 11:40:20 +09:00
parent 86b4c2fc3f
commit 30d2d72663
No known key found for this signature in database
GPG Key ID: 7CD2805BFA3770C6

View File

@ -1,3 +1,4 @@
class Time
# Creates a new \Time object from the current system time.
# This is the same as Time.new without arguments.
#
@ -6,7 +7,7 @@
#
# Parameter:
# :include: doc/time/in.rdoc
def Time.now(in: nil)
def self.now(in: nil)
new(in: __builtin.arg!(:in))
end
@ -53,11 +54,10 @@ end
# :include: doc/time/nsec.rdoc
# :include: doc/time/in.rdoc
#
def Time.at(time, subsec = (nosubsec = true), unit = (nounit = true), in: nil)
def self.at(time, subsec = (nosubsec = true), unit = (nounit = true), in: nil)
__builtin.time_s_at(time, subsec, unit, __builtin.arg!(:in), nosubsec, nounit)
end
class Time
# Returns a new \Time object based the on given arguments.
#
# With no positional arguments, returns the value of Time.now: