提交 2ae6e110 编写于 作者: Y Yves Senn

Merge pull request #15325 from tgxworld/no_need_to_call_to_s

Remove duplicated to_s method call.
......@@ -255,7 +255,7 @@ def method_for_action(action_name)
# 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
......@@ -226,7 +226,7 @@ def self.call(env)
# 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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册