diff options
-rw-r--r-- | railties/lib/rails/deprecation.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/deprecation.rb b/railties/lib/rails/deprecation.rb index c32b748ffd..3cf28e0818 100644 --- a/railties/lib/rails/deprecation.rb +++ b/railties/lib/rails/deprecation.rb @@ -10,12 +10,12 @@ module Rails def initialize(old, new) @old, @new = old, new - @target = eval "proc { #{new} }" + @target = ::Kernel.eval "proc { #{@new} }" @warned = false end def method_missing(meth, *args, &block) - ActiveSupport::Deprecation.warn("#{@old} is deprecated. Please use #{@new}") unless @warned + ::ActiveSupport::Deprecation.warn("#{@old} is deprecated. Please use #{@new}") unless @warned @warned = true target = @target.call |