Remove use of & logic operator. Closes #8114.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7571 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Nicholas Seckar 2007-09-22 19:02:51 +00:00
parent 0442f1ea75
commit defb4d08dc
2 changed files with 3 additions and 1 deletions

@ -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]

@ -980,7 +980,7 @@ def ensure_required_segments(segments)
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