Skip to content

Commit

Permalink
Don't need a separate name for the Time#to_a primitive
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed Mar 26, 2012
1 parent 571806d commit 332fc32
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions kernel/bootstrap/time.rb
Expand Up @@ -30,9 +30,9 @@ def usec
raise PrimitiveFailure, "Time#usec failed"
end

def decomposed
def to_a
Rubinius.primitive :time_decompose
raise PrimitiveFailure, "Time#decompose primitive failed"
raise PrimitiveFailure, "Time#to_a primitive failed"
end

def strftime(format)
Expand Down
6 changes: 1 addition & 5 deletions kernel/common/time.rb
Expand Up @@ -45,7 +45,7 @@ def self._load(data)
#++

def _dump(limit = nil)
tm = getgm.decomposed
tm = getgm.to_a

if (year & 0xffff) != year || year < 1900 then
raise ArgumentError, "year too big to marshal: #{year}"
Expand Down Expand Up @@ -149,10 +149,6 @@ def asctime
strftime("%a %b %e %H:%M:%S %Y")
end

def to_a
decomposed
end

def sec
to_a[0]
end
Expand Down

0 comments on commit 332fc32

Please sign in to comment.