Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method for Mash in 2.1 #153

Closed
nathany opened this issue May 1, 2014 · 5 comments
Closed

undefined method for Mash in 2.1 #153

nathany opened this issue May 1, 2014 · 5 comments

Comments

@nathany
Copy link

nathany commented May 1, 2014

We are loading up a YAML file and running Hashie::Mash.new(attrib)on it.

In 2.0.5 a predicate that isn't specified in our YAML/hash is falsey.

In 2.1.0+ we get a undefined method awesome? in this case (unless we specifically put awesome: false).

Can we configure Hashie to provide the old behaviour?

related to #17 & #60.

@dblock
Copy link
Member

dblock commented May 1, 2014

Can you please write a spec within the existing Hashie specs to describe what you want it to do? I'll help with the implementation.

@nathany
Copy link
Author

nathany commented May 1, 2014

You mean the test suite? Maybe it would help if I first knew if this was change was intentional. Been through the changelogs.

@dblock
Copy link
Member

dblock commented May 1, 2014

No code from those issues has been merged, #60 is still open following a discussion in #17. So if change there was, it wasn't intentional and is a regression.

There was a regression that introduced where respond_to? returned the wrong result, and the fix (#147) is on HEAD. That could be your problem - you should try on HEAD and if that didn't fix your issue, definitely write a test that reproduces the problem.

@nathany
Copy link
Author

nathany commented May 1, 2014

@dblock That is the issue and https://github.com/intridea/hashie/pull/147/files#diff-a351d9f0497eba6d279202565db07edfR333 has a spec to cover it.

Sorry for not trying against HEAD before opening another issue.

@nathany nathany closed this as completed May 1, 2014
@dblock
Copy link
Member

dblock commented May 1, 2014

Glad that worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants