Project

General

Profile

Actions

Bug #21828

closed

An incorrect warning message related to `benchmark` is shown when using `benchmark-ips`

Bug #21828: An incorrect warning message related to `benchmark` is shown when using `benchmark-ips`

Added by y-yagi (Yuji Yaginuma) 2 days ago. Updated 1 day ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 4.0.0 (2025-12-25 revision 553f1675f3) +PRISM [x86_64-linux]
[ruby-core:124443]

Description

Descrition

When using benchmark-ips gem with Ruby 4.0.0, the warning related to benchmark gem is shown.

Step to reproduce

# Gemfile
# frozen_string_literal: true

source "https://rubygems.org"

gem "benchmark-ips"
# script.rb
require "benchmark/ips"
$ bundle exec ruby -v script.rb
ruby 4.0.0 (2025-12-25 revision 553f1675f3) +PRISM [x86_64-linux]
script.rb:1: warning: benchmark/ips is found in benchmark, which is not part of the default gems since Ruby 4.0.0.
You can add benchmark to your Gemfile or gemspec to fix this error.

Expected behavior

The warning for benchmark isn't shown when using benchmark-ips.

Actions

Also available in: PDF Atom