From 86396f8c300c21bf72234de53c3c33c63e4ed9ce Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Sun, 25 May 2014 19:07:57 -0700 Subject: [PATCH] Remove duplicated to_s method call. --- actionpack/lib/abstract_controller/base.rb | 2 +- actionpack/lib/action_controller/metal.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/actionpack/lib/abstract_controller/base.rb b/actionpack/lib/abstract_controller/base.rb index c00f0d0c6f..acdfb33efa 100644 --- a/actionpack/lib/abstract_controller/base.rb +++ b/actionpack/lib/abstract_controller/base.rb @@ -255,7 +255,7 @@ module AbstractController # Checks if the action name is valid and returns false otherwise. def _valid_action_name?(action_name) - action_name.to_s !~ Regexp.new(File::SEPARATOR) + action_name !~ Regexp.new(File::SEPARATOR) end end end diff --git a/actionpack/lib/action_controller/metal.rb b/actionpack/lib/action_controller/metal.rb index 70ca99f01c..3bfc8d6460 100644 --- a/actionpack/lib/action_controller/metal.rb +++ b/actionpack/lib/action_controller/metal.rb @@ -226,7 +226,7 @@ module ActionController # Returns a Rack endpoint for the given action name. def self.action(name, klass = ActionDispatch::Request) - middleware_stack.build(name.to_s) do |env| + middleware_stack.build(name) do |env| new.dispatch(name, klass.new(env)) end end