lib/jimmy/transform_keys.rb in jimmy-0.5.4 vs lib/jimmy/transform_keys.rb in jimmy-0.5.5
- old
+ new
@@ -14,10 +14,10 @@
def cache(method)
(@cache ||= {})[method] ||= {}
end
def transform(sym, method)
- if method
+ if method && sym.is_a?(Symbol)
cache(method)[sym] ||= __send__(method, sym.to_s).to_sym
else
sym
end
end