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

Map to_s rather than to_s array #326

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hubert
Copy link
Contributor

@hubert hubert commented Mar 13, 2015

As written currently, we are calling to_s on an array of data's keys then checking whether the @_her_root_element is part of the string. I'm betting that the intention is to call to_s on the individual key and then check whether the root element is included in the stringified array of keys.

There are some incidental side effects

  • if the root element is nil, root_element_included always returns true.
  • if the root element is 'foo' and there is an key in the data hash 'foobar', root_element_included? will return true.

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

Successfully merging this pull request may close these issues.

1 participant