Lands #4842, makes datastore.delete() case insensitive.

bug/bundler_fix
HD Moore 2015-02-24 21:05:52 -06:00
commit 302458652c
No known key found for this signature in database
GPG Key ID: 22015B93FA604913
2 changed files with 12 additions and 0 deletions

View File

@ -43,6 +43,13 @@ class DataStore < Hash
super(find_key_case(k), v)
end
#
# Case-insensitive wrapper around delete
#
def delete(k)
super(find_key_case(k))
end
#
# Updates a value in the datastore with the specified name, k, to the

View File

@ -24,6 +24,11 @@ shared_examples "datastore" do
subject.to_h.should == { "foo" => "bar", "fizz" => "buzz" }
end
end
context "#delete" do
it "should delete the specified key" do
subject.delete("foo") == { "fizz" => "buzz" }
end
end
end
describe Msf::DataStore do