From the spec:
it "should add hashes" do
({:a => :b} + {:c => :d}).should == {:a=>:b, :c=>:d}
end
it "should subtract hashes" do
({:a=>:b, :c=>:d} - {:c => :d}).should == {:a => :b}
end
I'm kinda surprised this didn't exist already.
Here's the code; here's the spec. Both are in Utility Belt's Subversion repo, and should be available in an upcoming version.












