Skip to content

Conversation

@willnet
Copy link
Contributor

@willnet willnet commented Oct 24, 2025

When using Ruby 3.4 and okcomputer 1.19.0, the following warning appears. Based on the warning message, it seems that to use okcomputer with Ruby 3.5, the benchmark gem needs to be added as a dependency, so I did so.

/home/runner/work/savanna/savanna/vendor/bundle/ruby/3.4.0/gems/okcomputer-1.19.0/lib/ok_computer/check.rb:1: warning: /opt/hostedtoolcache/Ruby/3.4.7/x64/lib/ruby/3.4.0/benchmark.rb 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 benchmark to your Gemfile or gemspec to silence this warning.
Also please contact the author of okcomputer-1.19.0 to request adding benchmark into its gemspec.

When using Ruby 3.4 and okcomputer 1.19.0, the following warning appears.
Based on the warning message, it seems that to use okcomputer with Ruby 3.5, the benchmark gem needs to be added as a dependency, so I did so.

```
/home/runner/work/savanna/savanna/vendor/bundle/ruby/3.4.0/gems/okcomputer-1.19.0/lib/ok_computer/check.rb:1: warning: /opt/hostedtoolcache/Ruby/3.4.7/x64/lib/ruby/3.4.0/benchmark.rb 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 benchmark to your Gemfile or gemspec to silence this warning.
Also please contact the author of okcomputer-1.19.0 to request adding benchmark into its gemspec.
```
@willnet
Copy link
Contributor Author

willnet commented Oct 31, 2025

Hi @emmahsax , Could you please review this PR when you have a moment?

Copy link
Owner

@emmahsax emmahsax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi. We can probably add benchmark to the Gemfile here:

okcomputer/Gemfile

Lines 35 to 38 in 020168f

# Gems based on Ruby version
if ruby_version_float >= 2.5
gem "mutex_m", "~> 0.3" if rails_version_float < 7.1
end

Something like this:

# Gems based on Ruby version
if ruby_version_float >= 3.5
  gem "benchmark", "~> 0.5"
  gem "mutex_m", "~> 0.3" if rails_version_float < 7.1
elsif ruby_version_float >= 2.5
  gem "mutex_m", "~> 0.3" if rails_version_float < 7.1
end

The reasoning is that we don't have any other dependencies added to the Gemfile, and doing it this way would add benchmark to every version when that may not be necessary.

Also, please double-check my code, as I didn't test that if condition, but I think it should work just fine.

@willnet
Copy link
Contributor Author

willnet commented Nov 1, 2025

The gems listed in okcomputer/Gemfile are used only when developing okcomputer. They are not used when you use okcomputer itself. When using it, only the dependencies listed in okcomputer.gemspec are used.

Copy link
Owner

@emmahsax emmahsax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for that information. I did not know that.

@emmahsax emmahsax merged commit b2c8f5b into emmahsax:main Nov 3, 2025
62 checks passed
@willnet willnet deleted the add-benchmark branch November 4, 2025 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants