Project

General

Profile

Actions

Bug #20058

closed

`warning: bigdecimal/util is found in bigdecimal` even if the gem spec has the `add_dependency "bigdecimal"` entry

Added by yahonda (Yasuo Honda) 5 months ago. Updated 5 months ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 3.3.0dev (2023-12-08T11:25:04Z master cc9826503d) [x86_64-linux]
[ruby-core:115688]

Description

warning: bigdecimal/util is found in bigdecimal warning since https://github.com/ruby/ruby/commit/cc9826503d989df877adbcd94d39a6ff78d0b785

Steps to reproduce

  • foo.rb
# frozen_string_literal: true

require "bundler/inline"

gemfile(true) do
  source "https://rubygems.org"

  git_source(:github) { |repo| "https://github.com/#{repo}.git" }

  gem "rails", github: "rails/rails", branch: "main"
end

require "active_support"
require "minitest/autorun" # https://github.com/minitest/minitest/commit/5f5c2111f36658fd2636b108b8327ce4b2f3cf8d will resolve `warning: mutex_m was loaded from the standard library,`

# This require will raise `warning: bigdecimal/util is found in bigdecimal`
require "bigdecimal/util"

Expected behavior

No warning: bigdecimal/util is found in bigdecimal, which will no longer be part of the default gems since Ruby 3.4.0. Add bigdecimal to your Gemfile or gemspec. warnings because Rails has already has add_dependency "bigdecimal"
https://github.com/rails/rails/blob/main/activesupport/activesupport.gemspec#L44

Actual behavior

warning: bigdecimal/util is found in bigdecimal, which will no longer be part of the default gems since Ruby 3.4.0. Add bigdecimal to your Gemfile or gemspec. appears.

Note: warning: mutex_m was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add mutex_m to your Gemfile or gemspec. will be addressed by minitest.

$ ruby -v ; ruby foo.rb
ruby 3.3.0dev (2023-12-08T11:25:04Z master cc9826503d) [x86_64-linux]
Fetching https://github.com/rails/rails.git
Resolving dependencies...
Fetching gem metadata from https://rubygems.org/..........
/home/yahonda/.rbenv/versions/trunk/lib/ruby/gems/3.3.0+0/bundler/gems/rails-89d8569abe25/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb:4: warning: bigdecimal/util is found in bigdecimal, which will no longer be part of the default gems since Ruby 3.4.0. Add bigdecimal to your Gemfile or gemspec.
/home/yahonda/.rbenv/versions/trunk/lib/ruby/gems/3.3.0+0/gems/minitest-5.20.0/lib/minitest.rb:3: warning: mutex_m was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add mutex_m to your Gemfile or gemspec.
Run options: --seed 37509

# Running:



Finished in 0.001073s, 0.0000 runs/s, 0.0000 assertions/s.
0 runs, 0 assertions, 0 failures, 0 errors, 0 skips
$
Actions

Also available in: Atom PDF

Like0
Like0Like0Like1Like1Like1Like0Like0Like0Like0