Skip to content

Commit b20fc0b

Browse files
committed
Avoid quadratic iteration of ENV in ENv#to_a spec
1 parent 6b2db36 commit b20fc0b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

spec/ruby/core/env/to_a_spec.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
a = ENV.to_a
77
a.is_a?(Array).should == true
88
a.size.should == ENV.size
9-
ENV.each_pair { |k, v| a.should include([k, v])}
9+
a.each { |k,v| ENV[k].should == v }
10+
11+
a.first.should.is_a?(Array)
12+
a.first.size.should == 2
1013
end
1114

1215
it "returns the entries in the locale encoding" do

0 commit comments

Comments
 (0)