From 3b1955d1d750c7306f1d124760dd31fd0e0d0415 Mon Sep 17 00:00:00 2001 From: Mike Perham Date: Sun, 22 Apr 2012 19:22:09 -0700 Subject: [PATCH] Cleanup, prepare for release --- Changes.md | 1 + lib/sidekiq.rb | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) 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