Skip to content

Commit

Permalink
Merge pull request #81 from matschaffer/issue/object_id-warning-77
Browse files Browse the repository at this point in the history
Remove override of object_id #77
  • Loading branch information
jch committed Feb 18, 2013
2 parents 3ee465b + 58972fc commit dbad0b5
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

7 comments on commit dbad0b5

@Bredoxon
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi I'm using hashie version 2.0.0 and I'm getting the "redefining 'object_id' may cause serious problems" warning message, shouldn't apply this commit to the version 2 as well? I tried commenting out those lines and the warning message disappeared. Thanks!

@jch
Copy link
Contributor Author

@jch jch commented on dbad0b5 Feb 19, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. I'll be releasing another version after merging a few other pulls

@Bredoxon
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome thanks!

@keithpitt
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This warning is super annoying to see in my builds :P Any chance you can push out a new version with this fix?

@reset
Copy link

@reset reset commented on dbad0b5 Feb 26, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jch if you could release this as 2.0.1 it would significantly improve my day

@jch
Copy link
Contributor Author

@jch jch commented on dbad0b5 Feb 26, 2013 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reset
Copy link

@reset reset commented on dbad0b5 Feb 26, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jch @mbleigh greatly, greatly appreciated!

Please sign in to comment.