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 b3018e1Copy full SHA for b3018e1
lib/webmachine/media_type.rb
@@ -113,11 +113,8 @@ 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
+ [Dispatcher::Route::MATCH_ALL_STR, MATCHES_ALL, type].include?(other.type) ||
119
other.major == major && other.minor == Dispatcher::Route::MATCH_ALL_STR
120
- end
121
end
122
end # class MediaType
123
end # module Webmachine
0 commit comments