Skip to content

Commit d33ccb7

Browse files
committed
Add logger and ostruct gems for Ruby 4.0 compatibility
1 parent e0bc7cc commit d33ccb7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,6 @@ end
3030

3131
if RUBY_VERSION >= '4.0'
3232
gem 'pstore'
33+
gem 'logger'
34+
gem 'ostruct'
3335
end

lib/webmachine/media_type.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ def minor
113113
# ignoring params and taking into account wildcards
114114
def type_matches?(other)
115115
other = self.class.parse(other)
116-
[Dispatcher::Route::MATCH_ALL_STR, MATCHES_ALL, type].include?(other.type) || other.major == major && other.minor == Dispatcher::Route::MATCH_ALL_STR
116+
[Dispatcher::Route::MATCH_ALL_STR, MATCHES_ALL, type].include?(other.type) ||
117+
(other.major == major && other.minor == Dispatcher::Route::MATCH_ALL_STR)
117118
end
118119
end # class MediaType
119120
end # module Webmachine

0 commit comments

Comments
 (0)