diff --git a/Changes.md b/Changes.md index 17088f97..9610e546 100644 --- a/Changes.md +++ b/Changes.md @@ -5,6 +5,7 @@ Sidekiq will retry once per second until it can re-establish a connection. (ryanlecompte) - capistrano recipe now uses `bundle_cmd` if set [#147] +- handle multi\_json API changes (sferik) 1.1.2 ----------- diff --git a/lib/sidekiq.rb b/lib/sidekiq.rb index b953a627..8aa45915 100644 --- a/lib/sidekiq.rb +++ b/lib/sidekiq.rb @@ -82,21 +82,21 @@ module Sidekiq @server_chain end - def self.load_json(string, options={}) + def self.load_json(string) # Can't reliably detect whether MultiJson responds to load, since it's # a reserved word. Use adapter as a proxy for new features. if MultiJson.respond_to?(:adapter) - MultiJson.load(string, options) + MultiJson.load(string) else - MultiJson.decode(string, options) + MultiJson.decode(string) end end - def self.dump_json(object, options={}) + def self.dump_json(object) if MultiJson.respond_to?(:dump) - MultiJson.dump(object, options) + MultiJson.dump(object) else - MultiJson.encode(object, options) + MultiJson.encode(object) end end