aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-05-04 18:46:48 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-05-04 18:46:48 -0300
commite2334a249aa7b9e18d684fd5cf213e78053a9222 (patch)
treedc6dddde602964075d873560f8656694bc6c3193 /actionpack/lib/action_dispatch
parent95ab4fd6b7cfd1f65c68e773377cc79e777f50fc (diff)
downloadrails-e2334a249aa7b9e18d684fd5cf213e78053a9222.tar.gz
rails-e2334a249aa7b9e18d684fd5cf213e78053a9222.tar.bz2
rails-e2334a249aa7b9e18d684fd5cf213e78053a9222.zip
Do not use short-circuit return
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index 6c4c7c8d80..4c20974ac7 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -171,8 +171,9 @@ module ActionDispatch
end
def verify_callable_constraint(callable_constraint)
- return if callable_constraint.respond_to?(:call) || callable_constraint.respond_to?(:matches?)
- raise ArgumentError, "Invalid constraint: #{callable_constraint.inspect} must respond to :call or :matches?"
+ unless callable_constraint.respond_to?(:call) || callable_constraint.respond_to?(:matches?)
+ raise ArgumentError, "Invalid constraint: #{callable_constraint.inspect} must respond to :call or :matches?"
+ end
end
def normalize_conditions!