aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Seckar <nseckar@gmail.com>2007-09-22 19:02:51 +0000
committerNicholas Seckar <nseckar@gmail.com>2007-09-22 19:02:51 +0000
commitdefb4d08dca88500f172da9e90e5af19187c7b08 (patch)
tree5dc84f7d16fe1ac028291e9fd5048d266479476e
parent0442f1ea75ab83a6aed3851ef8b3201a925ad8a1 (diff)
downloadrails-defb4d08dca88500f172da9e90e5af19187c7b08.tar.gz
rails-defb4d08dca88500f172da9e90e5af19187c7b08.tar.bz2
rails-defb4d08dca88500f172da9e90e5af19187c7b08.zip
Remove use of & logic operator. Closes #8114.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7571 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--actionpack/CHANGELOG2
-rw-r--r--actionpack/lib/action_controller/routing.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index c27933445a..df25ec800f 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Remove use of & logic operator. Closes #8114. [watson]
+
* Fixed JavaScriptHelper#escape_javascript to also escape closing tags #8023 [rubyruy]
* Fixed TextHelper#word_wrap for multiline strings with extra carrier returns #8663 [seth]
diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb
index d1df7e6b43..0d78641b15 100644
--- a/actionpack/lib/action_controller/routing.rb
+++ b/actionpack/lib/action_controller/routing.rb
@@ -980,7 +980,7 @@ module ActionController
warn "Route segment \"#{segment.to_s}\" cannot be optional because it precedes a required segment. This segment will be required."
end
segment.is_optional = false
- elsif allow_optional & segment.respond_to?(:default) && segment.default
+ elsif allow_optional && segment.respond_to?(:default) && segment.default
# if a segment has a default, then it is optional
segment.is_optional = true
end