Skip to content

Commit

Permalink
Merge pull request #15325 from tgxworld/no_need_to_call_to_s
Browse files Browse the repository at this point in the history
Remove duplicated to_s method call.
  • Loading branch information
senny committed May 26, 2014
2 parents 42fe948 + 86396f8 commit 2ae6e11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion actionpack/lib/abstract_controller/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/metal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2ae6e11

Please sign in to comment.