Skip to content

Commit

Permalink
Remove override of object_id #77
Browse files Browse the repository at this point in the history
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
  • Loading branch information
matschaffer committed Feb 18, 2013
1 parent 3ee465b commit 58972fc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
4 changes: 0 additions & 4 deletions lib/hashie/mash.rb
Expand Up @@ -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, :[]=

Expand Down
9 changes: 0 additions & 9 deletions spec/hashie/mash_spec.rb
Expand Up @@ -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
Expand Down

0 comments on commit 58972fc

Please sign in to comment.