aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-04-22 18:29:05 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-04-22 23:11:15 +0900
commitca9ac310028d0009edf1fbf657541d2dea327535 (patch)
tree83fd7c9fcbe6410ca670ae15439e85fe8c95188e /railties
parent0541a0d5481043a9c78371446389794944daf3f0 (diff)
downloadrails-ca9ac310028d0009edf1fbf657541d2dea327535.tar.gz
rails-ca9ac310028d0009edf1fbf657541d2dea327535.tar.bz2
rails-ca9ac310028d0009edf1fbf657541d2dea327535.zip
`respond_to_missing?` should be private
Follow up of 03d3f036. Some of `respond_to?` were replaced to `respond_to_missing?` in 03d3f036. But the visibility is still public. It should be private.
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/railtie.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/lib/rails/railtie.rb b/railties/lib/rails/railtie.rb
index 474118c0a9..3476bb0eb5 100644
--- a/railties/lib/rails/railtie.rb
+++ b/railties/lib/rails/railtie.rb
@@ -162,10 +162,6 @@ module Rails
@instance ||= new
end
- def respond_to_missing?(*args)
- instance.respond_to?(*args) || super
- end
-
# Allows you to configure the railtie. This is the same method seen in
# Railtie::Configurable, but this module is no longer required for all
# subclasses of Railtie so we provide the class method here.
@@ -178,6 +174,10 @@ module Rails
ActiveSupport::Inflector.underscore(string).tr("/", "_")
end
+ def respond_to_missing?(name, _)
+ instance.respond_to?(name) || super
+ end
+
# If the class method does not have a method, then send the method call
# to the Railtie instance.
def method_missing(name, *args, &block)