sh8 / wunderlist-api

wunderlist-api enable you to operate your wunderlist resources easily with Ruby.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hash#stringify_keys breaks in Rails 5.2.0

kleinjm opened this issue · comments

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

def stringify_keys
self.replace(self.inject({}){|a,(k,v)| a[k.to_s] = v; a})
end

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