summaryrefslogtreecommitdiff
path: root/spec/ruby/core/enumerator/each_with_index_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/enumerator/each_with_index_spec.rb')
-rw-r--r--spec/ruby/core/enumerator/each_with_index_spec.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/spec/ruby/core/enumerator/each_with_index_spec.rb b/spec/ruby/core/enumerator/each_with_index_spec.rb
index 0a3c11e0b4..7332fd628b 100644
--- a/spec/ruby/core/enumerator/each_with_index_spec.rb
+++ b/spec/ruby/core/enumerator/each_with_index_spec.rb
@@ -10,7 +10,7 @@ describe "Enumerator#each_with_index" do
enum1 = [1,2,3].select
enum2 = enum1.each_with_index
enum2.should be_an_instance_of(Enumerator)
- enum1.should_not === enum2
+ enum1.should_not == enum2
end
it "raises an ArgumentError if passed extra arguments" do
@@ -28,9 +28,7 @@ describe "Enumerator#each_with_index" do
it "returns the iterator's return value" do
[1,2,3].select.with_index { |a,b| false }.should == []
end
-end
-describe "Enumerator#each_with_index" do
it "returns the correct value if chained with itself" do
[:a].each_with_index.each_with_index.to_a.should == [[[:a,0],0]]
[:a].each.with_index.with_index.to_a.should == [[[:a,0],0]]