Add namespace check
This commit is contained in:
parent
92a074bc18
commit
f9ccc6efdf
|
@ -1,7 +1,10 @@
|
|||
gem 'multi_json', '>= 1.0.0'
|
||||
require 'multi_json'
|
||||
|
||||
if !MultiJson.respond_to?(:load) || [Kernel, ActiveSupport::Dependencies::Loadable].include?(MultiJson.method(:load).owner)
|
||||
if !MultiJson.respond_to?(:load) || [
|
||||
defined?(Kernel) && Kernel,
|
||||
defined?(ActiveSupport::Dependencies::Loadable) && ActiveSupport::Dependencies::Loadable
|
||||
].compact.include?(MultiJson.method(:load).owner)
|
||||
module MultiJson
|
||||
class <<self
|
||||
alias :load :decode
|
||||
|
|
Loading…
Reference in New Issue