Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Correctly update environment variables when set more than once

  • Loading branch information...
commit 08daac33dfaba80212772c7a94a85554537e42f6 1 parent 5fba2db
@njonsson authored
Showing with 3 additions and 1 deletion.
  1. +1 −1  lib/cape/hash_list.rb
  2. +2 −0  spec/cape/hash_list_spec.rb
View
2  lib/cape/hash_list.rb
@@ -51,7 +51,7 @@ def []=(key, value)
Array(pair).first == key
end
if index
- super key, value
+ super(index, [key, value])
else
self << [key, value]
end
View
2  spec/cape/hash_list_spec.rb
@@ -13,6 +13,7 @@
describe 'when values are added out of order' do
before :each do
+ subject['foo'] = 'xxx'
subject['foo'] = 'bar'
subject['baz'] = 'qux'
end
@@ -35,6 +36,7 @@
it 'should index the values as expected' do
subject['foo'].should == 'bar'
subject['baz'].should == 'qux'
+ subject['not-found'].should be_nil
end
describe 'when sent #clear' do
Please sign in to comment.
Something went wrong with that request. Please try again.