We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Style/RedundantCondition
1 parent 4f1c620 commit 4e8fe8cCopy full SHA for 4e8fe8c
lib/webmachine/media_type.rb
@@ -113,11 +113,7 @@ def minor
113
# ignoring params and taking into account wildcards
114
def type_matches?(other)
115
other = self.class.parse(other)
116
- if [Dispatcher::Route::MATCH_ALL_STR, MATCHES_ALL, type].include?(other.type)
117
- true
118
- else
119
- other.major == major && other.minor == Dispatcher::Route::MATCH_ALL_STR
120
- end
+ [Dispatcher::Route::MATCH_ALL_STR, MATCHES_ALL, type].include?(other.type) || other.major == major && other.minor == Dispatcher::Route::MATCH_ALL_STR
121
end
122
end # class MediaType
123
end # module Webmachine
0 commit comments