aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--railties/lib/rails.rb1
-rw-r--r--railties/lib/rails/deprecation.rb33
2 files changed, 0 insertions, 34 deletions
diff --git a/railties/lib/rails.rb b/railties/lib/rails.rb
index bbf28a8c08..7c41367a84 100644
--- a/railties/lib/rails.rb
+++ b/railties/lib/rails.rb
@@ -8,7 +8,6 @@ require 'active_support/core_ext/logger'
require 'rails/application'
require 'rails/version'
-require 'rails/deprecation'
require 'active_support/railtie'
require 'action_dispatch/railtie'
diff --git a/railties/lib/rails/deprecation.rb b/railties/lib/rails/deprecation.rb
deleted file mode 100644
index 37896e0cae..0000000000
--- a/railties/lib/rails/deprecation.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-require "active_support/string_inquirer"
-require "active_support/basic_object"
-
-module Rails
- class DeprecatedConstant < ActiveSupport::BasicObject
- def self.deprecate(old, new)
- constant = self.new(old, new)
- eval "::#{old} = constant"
- end
-
- def initialize(old, new)
- @old, @new = old, 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
- @warned = true
-
- target = @target.call
- if target.respond_to?(meth)
- target.send(meth, *args, &block)
- else
- super
- end
- end
- end
-
- DeprecatedConstant.deprecate("RAILS_ROOT", "::Rails.root.to_s")
- DeprecatedConstant.deprecate("RAILS_ENV", "::Rails.env")
- DeprecatedConstant.deprecate("RAILS_DEFAULT_LOGGER", "::Rails.logger")
-end