Skip to content

Commit

Permalink
Showing 2 changed files with 15 additions and 5 deletions.
5 changes: 0 additions & 5 deletions spec/truffle/tags/core/array/reverse_each_tags.txt

This file was deleted.

15 changes: 15 additions & 0 deletions truffle/src/main/ruby/core/rubinius/common/array.rb
Original file line number Diff line number Diff line change
@@ -373,6 +373,21 @@ def flatten!(level=-1)
nil
end

def reverse_each
return to_enum(:reverse_each) unless block_given?

stop = @start - 1
i = stop + @total
tuple = @tuple

while i > stop
yield tuple.at(i)
i -= 1
end

self
end

def to_a
if self.instance_of? Array
self

0 comments on commit c3a7c5a

Please sign in to comment.