Skip to content

Commit 4e8fe8c

Browse files
committed
RuboCop: resolve Style/RedundantCondition
1 parent 4f1c620 commit 4e8fe8c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/webmachine/media_type.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,7 @@ def minor
113113
# ignoring params and taking into account wildcards
114114
def type_matches?(other)
115115
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
116+
[Dispatcher::Route::MATCH_ALL_STR, MATCHES_ALL, type].include?(other.type) || other.major == major && other.minor == Dispatcher::Route::MATCH_ALL_STR
121117
end
122118
end # class MediaType
123119
end # module Webmachine

0 commit comments

Comments
 (0)