From 58972fc22ef0040d2ad7a0c1b7f2361e02d5a746 Mon Sep 17 00:00:00 2001 From: Mat Schaffer Date: Mon, 18 Feb 2013 17:10:52 -0500 Subject: [PATCH] Remove override of object_id #77 Avoids this warning on 1.9.3: /Users/mat/.rvm/gems/ruby-1.9.3-p194@.../gems/hashie-2.0.0/lib/hashie/mash.rb:80: warning: redefining `object_id' may cause serious problems --- lib/hashie/mash.rb | 4 ---- spec/hashie/mash_spec.rb | 9 --------- 2 files changed, 13 deletions(-) diff --git a/lib/hashie/mash.rb b/lib/hashie/mash.rb index 5456bb3e..4d25b3b9 100644 --- a/lib/hashie/mash.rb +++ b/lib/hashie/mash.rb @@ -77,10 +77,6 @@ def type #:nodoc: self["type"] end - def object_id #:nodoc: - self["object_id"] - end - alias_method :regular_reader, :[] alias_method :regular_writer, :[]= diff --git a/spec/hashie/mash_spec.rb b/spec/hashie/mash_spec.rb index 71f398d2..6cd3994a 100644 --- a/spec/hashie/mash_spec.rb +++ b/spec/hashie/mash_spec.rb @@ -97,15 +97,6 @@ @mash.author.should be_nil end - it "should not call super if object_id is not a key" do - @mash.object_id.should == nil - end - - it "should return the value if object_id is a key" do - @mash.object_id = "Steve" - @mash.object_id.should == "Steve" - end - it "should not call super if id is not a key" do @mash.id.should == nil end