sh8 / wunderlist-api

wunderlist-api enable you to operate your wunderlist resources easily with Ruby.
MIT License
39 stars 18 forks source link

Hash#stringify_keys breaks in Rails 5.2.0 #25

Open kleinjm opened 6 years ago

kleinjm commented 6 years ago

Not exactly sure what's causing this to break but I'm getting this error after upgrading my app to rails 5.2.0.

pry(main)> Recipe.new
FrozenError: can't modify frozen Hash
from /Users/jklein/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/wunderlist-api-1.1.2/lib/wunderlist/helper.rb:62:in `replace'

Related to this code https://github.com/sh8/wunderlist-api/blob/9ca337d5f768b89052ea4dbc0d0d2fce96d9d3a8/lib/wunderlist/helper.rb#L61-L63

Feel free to pull my app, add your gem back and try creating a new recipe.

kleinjm commented 6 years ago

Fixed in my fork if you care https://github.com/kleinjm/wunderlist-api/commit/76f1f307637b1831adcc9d98237e54f3953f0522