Skip to content

Commit 8dd49f7

Browse files
committed
Revert "Added specs for Enumerator#peek behaviour. When the Enumerator position is already at the end and method peek is called."
This reverts commit 1728b8b. There's an existing spec for this: https://github.com/rubyspec/rubyspec/blob/master/core/enumerator/peek_spec.rb#L33-36
1 parent 448f396 commit 8dd49f7

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

optional/capi/enumerator_spec.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,6 @@
2525
enumerator = @s.rb_enumeratorize(@enumerable, :each, :arg1, :arg2)
2626
enumerator.class.should == Enumerator
2727
end
28-
29-
it 'raises an exception when the enumerator position is already at the end' do
30-
e = 2.times
31-
e.peek.should == 0
32-
e.next
33-
e.peek.should == 1
34-
e.next
35-
lambda { e.peek }.should raise_error(StopIteration)
36-
end
3728
end
3829

3930
it "enumerates the given object" do

0 commit comments

Comments
 (0)