mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Shrink timev.rb iseq size
This commit is contained in:
parent
86b4c2fc3f
commit
30d2d72663
1 changed files with 59 additions and 59 deletions
6
timev.rb
6
timev.rb
|
@ -1,3 +1,4 @@
|
||||||
|
class Time
|
||||||
# Creates a new \Time object from the current system time.
|
# Creates a new \Time object from the current system time.
|
||||||
# This is the same as Time.new without arguments.
|
# This is the same as Time.new without arguments.
|
||||||
#
|
#
|
||||||
|
@ -6,7 +7,7 @@
|
||||||
#
|
#
|
||||||
# Parameter:
|
# Parameter:
|
||||||
# :include: doc/time/in.rdoc
|
# :include: doc/time/in.rdoc
|
||||||
def Time.now(in: nil)
|
def self.now(in: nil)
|
||||||
new(in: __builtin.arg!(:in))
|
new(in: __builtin.arg!(:in))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -53,11 +54,10 @@ end
|
||||||
# :include: doc/time/nsec.rdoc
|
# :include: doc/time/nsec.rdoc
|
||||||
# :include: doc/time/in.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)
|
__builtin.time_s_at(time, subsec, unit, __builtin.arg!(:in), nosubsec, nounit)
|
||||||
end
|
end
|
||||||
|
|
||||||
class Time
|
|
||||||
# Returns a new \Time object based the on given arguments.
|
# Returns a new \Time object based the on given arguments.
|
||||||
#
|
#
|
||||||
# With no positional arguments, returns the value of Time.now:
|
# With no positional arguments, returns the value of Time.now:
|
||||||
|
|
Loading…
Add table
Reference in a new issue