Skip to content

Commit

Permalink
Removed Mash#id and Mash#type.
Browse files Browse the repository at this point in the history
Ruby 1.8.7 had Object#id and #type, both of which were deprecated,
which Hashie::Mash wanted to cover with more reasonable methods.
These methods in Object were removed in ruby 1.9.  The cover methods
are unneeded, and can cause problems with Mash::SafeAssignment
preventing you from using these as keys.

Fixes #290
  • Loading branch information
jrochkind authored and dblock committed Apr 8, 2015
1 parent 266bb79 commit 61fc9a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Next Release

* Your contribution here
* [#292](https://github.com/intridea/hashie/pull/292): Removed `Mash#id` and `Mash#type` - [@jrochkind](https://github.com/jrochkind).
* Your contribution here.

## 3.4.1 (3/31/2015)

Expand Down
8 changes: 0 additions & 8 deletions lib/hashie/mash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,6 @@ def initialize(source_hash = nil, default = nil, &blk)

class << self; alias_method :[], :new; end

def id #:nodoc:
self['id']
end

def type #:nodoc:
self['type']
end

alias_method :regular_reader, :[]
alias_method :regular_writer, :[]=

Expand Down

0 comments on commit 61fc9a9

Please sign in to comment.