Skip to content

Commit

Permalink
This should resolve the issue with Kernel#load.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob Aman committed Oct 8, 2012
1 parent 2c567fd commit dd8cee6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/compat/multi_json.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
gem 'multi_json', '>= 1.0.0'
require 'multi_json'

unless MultiJson.respond_to?(:load)
if !MultiJson.respond_to?(:load) || MultiJson.method(:load).owner == Kernel
module MultiJson
class <<self
alias :load :decode
end
end
end
unless MultiJson.respond_to?(:dump)
if !MultiJson.respond_to?(:dump)
module MultiJson
class <<self
alias :dump :encode
Expand Down

0 comments on commit dd8cee6

Please sign in to comment.