Commit d04973e
committed
Fix a lint error that occurred when using Ruby 3.4
In Ruby 3.4, base64 is no longer part of the standard library, which was causing the following error.
```
Run bundle exec rake rubocop
bundle exec rake rubocop
shell: /usr/bin/bash -e {0}
rubocop -c .rubocop.yml --display-only-fail-level-offenses -D
/home/runner/work/ruby-http-client/ruby-http-client/vendor/bundle/ruby/3.4.0/gems/rubocop-1.24.1/lib/rubocop/formatter/html_formatter.rb:5: warning: ostruct was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add ostruct to your Gemfile or gemspec to silence this warning.
/home/runner/work/ruby-http-client/ruby-http-client/vendor/bundle/ruby/3.4.0/gems/rubocop-1.24.1/lib/rubocop/formatter/html_formatter.rb:6: warning: base64 was loaded from the standard library, but is not part of the default gems starting from Ruby 3.4.0.
You can add base64 to your Gemfile or gemspec to silence this warning.
/opt/hostedtoolcache/Ruby/3.4.6/x64/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require': cannot load such file -- base64 (LoadError)
from /opt/hostedtoolcache/Ruby/3.4.6/x64/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
from /home/runner/work/ruby-http-client/ruby-http-client/vendor/bundle/ruby/3.4.0/gems/rubocop-1.24.1/lib/rubocop/formatter/html_formatter.rb:6:in '<top (required)>'
from /home/runner/work/ruby-http-client/ruby-http-client/vendor/bundle/ruby/3.4.0/gems/rubocop-1.24.1/lib/rubocop.rb:669:in 'Kernel#require_relative'
from /home/runner/work/ruby-http-client/ruby-http-client/vendor/bundle/ruby/3.4.0/gems/rubocop-1.24.1/lib/rubocop.rb:669:in '<top (required)>'
from /opt/hostedtoolcache/Ruby/3.4.6/x64/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require'
from /opt/hostedtoolcache/Ruby/3.4.6/x64/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
from /home/runner/work/ruby-http-client/ruby-http-client/vendor/bundle/ruby/3.4.0/gems/rubocop-1.24.1/exe/rubocop:6:in '<top (required)>'
from /home/runner/work/ruby-http-client/ruby-http-client/vendor/bundle/ruby/3.4.0/bin/rubocop:25:in 'Kernel#load'
from /home/runner/work/ruby-http-client/ruby-http-client/vendor/bundle/ruby/3.4.0/bin/rubocop:25:in '<main>'
rake aborted!
Command failed with status (1): [rubocop -c .rubocop.yml --display-only-fail-level-offenses -D]
/home/runner/work/ruby-http-client/ruby-http-client/Rakefile:9:in 'block in <top (required)>'
/home/runner/work/ruby-http-client/ruby-http-client/vendor/bundle/ruby/3.4.0/gems/rake-13.3.0/exe/rake:27:in '<top (required)>'
/opt/hostedtoolcache/Ruby/3.4.6/x64/bin/bundle:25:in 'Kernel#load'
/opt/hostedtoolcache/Ruby/3.4.6/x64/bin/bundle:25:in '<main>'
```1 parent 54e4e17 commit d04973e
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
0 commit comments