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

Dash keys are always converted to String #151

Closed
dblock opened this issue May 1, 2014 · 2 comments
Closed

Dash keys are always converted to String #151

dblock opened this issue May 1, 2014 · 2 comments
Labels

Comments

@dblock
Copy link
Member

dblock commented May 1, 2014

Was this by design? Any assignment is converted to a string.

@dblock dblock added the question label May 1, 2014
@dblock dblock changed the title Trash keys are always strings Dash keys are always strings May 1, 2014
@dblock dblock changed the title Dash keys are always strings Dash keys are always converted to String May 1, 2014
@michaelherold
Copy link
Member

I'm not sure that's the case. On master, I ran the example code and here's the result:

class Tricky < Hashie::Dash
  property :trick
  property 'trick'
end

p = Tricky.new(trick: 'one', 'trick' => 'two')
p.trick # => 'one'
p[:trick] # => 'one'
p['trick'] # => 'two'

Were you seeing something different?

@dblock
Copy link
Member Author

dblock commented Aug 21, 2014

This was fixed in #152.

@dblock dblock closed this as completed Aug 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants