diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index c27933445ad8c5c9b9e3cf34794720bfb53df3a1..df25ec800faddd99f8cd967784f7efdb8381be3f 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 d1df7e6b431b018cb0ddebf4085a1bbd6e8e50b4..0d78641b15c9c27626d643a31b8af2e02d21a36f 100644 --- a/actionpack/lib/action_controller/routing.rb +++ b/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