Robot Has No Heart

Xavier Shay blogs here

A robot that does not have a heart

Facets patch

1
2
$ svn log svn://rubyforge.org/var/svn/facets/trunk -r 383 -v
---------------------------------------------------------------------

r383 | transami | 2007-11-03 23:31:54 +1100 (Sat, 03 Nov 2007) | 2 lines
Changed paths:
M /trunk/lib/core/facets/hash/op.rb
M /trunk/test/unit/hash/test_op.rb

Fixed bug in Hash#- Thanks to Xavier Shay.

1
2
3
4
--- ruby
require 'facets/hash/op'
{:a => 1, :b => 2, :c => 3} - [:a, :b]            # => {:c => 3}
{:a => 1, :b => 2, :c => 3} - {:a => 1, :b => 99} # => {:b => 2, :c => 3}

It may be small, but it’s authentic. In the 2.0.5 gem.

A pretty flower Another pretty flower