Skip to content

Commit

Permalink
Avoid deprecation warning in public plugin when using Ruby 3.4.0-prev…
Browse files Browse the repository at this point in the history
…iew2
  • Loading branch information
jeremyevans committed Oct 8, 2024
1 parent 8a5cc1f commit cc169d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
= master

* Avoid deprecation warning in public plugin when using Ruby 3.4.0-preview2 (jeremyevans)

* Evaluate class_matcher and symbol_matcher blocks in route-block context (jeremyevans)

* Allow class_matcher and symbol_matcher blocks to return non-arrays (jeremyevans)
Expand Down
2 changes: 1 addition & 1 deletion lib/roda/plugins/public.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ module RodaPlugins
# end
module Public
SPLIT = Regexp.union(*[File::SEPARATOR, File::ALT_SEPARATOR].compact)
PARSER = URI::DEFAULT_PARSER
RACK_FILES = defined?(Rack::Files) ? Rack::Files : Rack::File
ENCODING_MAP = {:zstd=>'zstd', :brotli=>'br', :gzip=>'gzip'}.freeze
ENCODING_EXTENSIONS = {'br'=>'.br', 'gzip'=>'.gz', 'zstd'=>'.zst'}.freeze

# :nocov:
PARSER = defined?(::URI::RFC2396_PARSER) ? ::URI::RFC2396_PARSER : ::URI::DEFAULT_PARSER
MATCH_METHOD = RUBY_VERSION >= '2.4' ? :match? : :match
# :nocov:

Expand Down

0 comments on commit cc169d2

Please sign in to comment.