Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


The value of "count" fields is reported incorrectly #29

wesnolte opened this Issue · 8 comments

9 participants


Hashie::Mash values such as and are incorrect when retrieved using this notation. I can get the correct values when using[:count] so I suspect that "count" is a reserved keyword somewhere. I'm a bit of a ruby n00b but if someone can point me in the right direction I'll have a stab at fixing the code.


+1, count is a instance method of Hashie::Mash


+1 on this




Just ran into this too. Bump.


There's a discussion of this here intridea/hashie#119
It looks like the hashie people are going to raise an argumentException when a collision occurs. So we'll need to deal with above and probably create an alias for any arguments which collide e.g. count.


I wanted to drop by to mention that Hashie 3.3.1 adds a new extension Hashie::Extensions::MethodAccessWithOverride that might be of use to you guys. Including it in a Hash will give you method-like access to your keys and will allow you to overwrite methods with those keys. It sounded like that's what you were looking for.

There's also a new SafeAssignment Mash extension that will raise an error if you try to overwrite a method with a key if you'd rather go that way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.