Skip to content
Browse files

Remove use of & logic operator. Closes #8114.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7571 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 0442f1e commit defb4d08dca88500f172da9e90e5af19187c7b08 @seckar seckar committed Sep 22, 2007
Showing with 3 additions and 1 deletion.
  1. +2 −0 actionpack/CHANGELOG
  2. +1 −1 actionpack/lib/action_controller/routing.rb
View
2 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]
View
2 actionpack/lib/action_controller/routing.rb
@@ -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

0 comments on commit defb4d0

Please sign in to comment.
Something went wrong with that request. Please try again.