lib/backports/1.9/hash.rb in backports-1.9.0 vs lib/backports/1.9/hash.rb in backports-1.10.0

- old
+ new

@@ -3,10 +3,10 @@ # <tt>Hash[[[:foo, :bar],[:hello, "world"]]] ==> {:foo => :bar, :hello => "world"}</tt> class << self def try_convert(x) return nil unless x.respond_to? :to_hash x.to_hash - end unless method_defined? :to_hash + end unless method_defined? :try_convert end # Standard in Ruby 1.9. See official documentation[http://ruby-doc.org/core-1.9/classes/Hash.html] def default_proc=(proc) replace(Hash.new(&Backports.coerce_to(proc, Proc, :to_proc)).merge!(self)) \ No newline at end of file