Permalink
Browse files

Also need to deprecate engine first. We are using this in Rails

  • Loading branch information...
1 parent 2989d6e commit 9d85fa6b2a475ccfd08062243861d2ceaece808f @arunagw arunagw committed Apr 16, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/multi_json.rb
View
@@ -47,6 +47,12 @@ def engine
self.adapter
end
+ # TODO: Remove for 2.0 release (but no sooner)
+ def engine=(new_engine)
+ Kernel.warn "#{Kernel.caller.first}: [DEPRECATION] MultiJson.engine= is deprecated and will be removed in the next major version. Use MultiJson.use instead."
+ self.use(new_engine)
+ end
+
# Get the current adapter class.
def adapter
return @adapter if @adapter

0 comments on commit 9d85fa6

Please sign in to comment.