Compatible multi_json >= 1.0.0 with Rails3.2.8
authorsanemat <o.gata.ken@gmail.com>
Wed, 10 Oct 2012 17:51:34 +0000 (02:51 +0900)
committersanemat <o.gata.ken@gmail.com>
Wed, 10 Oct 2012 17:51:34 +0000 (02:51 +0900)
lib/compat/multi_json.rb

index 7d3953ae90e131503eca8ed5d5bd172b08fc4df3..5339385675072b6584e7aec65a5e7ba4a9bc7037 100644 (file)
@@ -1,7 +1,7 @@
 gem 'multi_json', '>= 1.0.0'
 require 'multi_json'
 
-if !MultiJson.respond_to?(:load) || MultiJson.method(:load).owner == Kernel
+if !MultiJson.respond_to?(:load) || [Kernel, ActiveSupport::Dependencies::Loadable].include?(MultiJson.method(:load).owner)
   module MultiJson
     class <<self
       alias :load :decode