Skip to content
Permalink
Browse files

remove a few specs around enumerators

  • Loading branch information
Alex Gaynor
Alex Gaynor committed Mar 26, 2013
1 parent ffc11e1 commit 6a6f8be57ce8a2ab5f4ae83662b8505d815f81c5
@@ -61,7 +61,8 @@ def at(idx)
self[idx]
end

def each
def each(&block)
return self.enum_for(:each) unless block
i = 0
while i < self.length
yield self[i]
@@ -296,6 +297,7 @@ def values_at(*args)
end

def each_index(&block)
return self.enum_for(:each_index) unless block
0.upto(size - 1, &block)
self
end
@@ -305,6 +307,7 @@ def reverse
end

def reverse_each(&block)
return self.enum_for(:reverse_each) unless block
i = self.length - 1
while i >= 0
yield self[i]

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 6a6f8be

Please sign in to comment.
You can’t perform that action at this time.