aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/env/each_key_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/env/each_key_spec.rb')
-rw-r--r--spec/ruby/core/env/each_key_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/ruby/core/env/each_key_spec.rb b/spec/ruby/core/env/each_key_spec.rb
index 294bf39912..5c5cf4f80e 100644
--- a/spec/ruby/core/env/each_key_spec.rb
+++ b/spec/ruby/core/env/each_key_spec.rb
@@ -19,7 +19,9 @@ describe "ENV.each_key" do
end
it "returns an Enumerator if called without a block" do
- ENV.each_key.should be_an_instance_of(Enumerator)
+ enum = ENV.each_key
+ enum.should be_an_instance_of(Enumerator)
+ enum.to_a.should == ENV.keys
end
it "returns keys in the locale encoding" do