Skip to content
Permalink
Browse files
[Truffle] Pulled Array#reverse_each from Rubinius.
  • Loading branch information
nirvdrum committed Feb 19, 2015
1 parent 0d40fe1 commit c3a7c5a4efe8a2d032c48a450a8ba6ea4789f5bb
Showing 2 changed files with 15 additions and 5 deletions.

This file was deleted.

@@ -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.