From: "Eregon (Benoit Daloze) via ruby-core" Date: 2023-07-08T10:25:42+00:00 Subject: [ruby-core:114118] [Ruby master Bug#19762] rubyspec refers wrongly ruby version instead of gem versions Issue #19762 has been updated by Eregon (Benoit Daloze). Thanks for filing the issues, I replied on the ruby/spec issue. Do you have an example where it causes problems? Is it not trivial to fix then? ---------------------------------------- Bug #19762: rubyspec refers wrongly ruby version instead of gem versions https://bugs.ruby-lang.org/issues/19762#change-103790 * Author: nobu (Nobuyoshi Nakada) * Status: Open * Priority: Normal * Assignee: Eregon (Benoit Daloze) * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- ```shell-session $ git grep ruby_version_is spec/ruby/library/ | grep -F -v -e /rbconfig/ -e /objectspace/ -e /coverage/ -e /fiber/ | wc -l 193 ``` Except for libraries excluded with `grep -v` in the above, the others are default gems and their own versions which are unrelated to `RUBY_VERSION`. `version_is` must be used with appropriate versions instead of `ruby_version_is`, for example: ``` spec/ruby/library/bigdecimal/remainder_spec.rb:57: version_is BigDecimal::VERSION, ""..."3.1.4" do spec/ruby/library/datetime/to_time_spec.rb:22: version_is(date_version, '3.2.3') do spec/ruby/library/logger/device/close_spec.rb:18: version_is Logger::VERSION, ""..."1.4.0" do spec/ruby/library/logger/device/close_spec.rb:25: version_is Logger::VERSION, "1.4.0" do spec/ruby/library/logger/device/write_spec.rb:38: version_is Logger::VERSION, ""..."1.4.0" do spec/ruby/library/logger/device/write_spec.rb:45: version_is Logger::VERSION, "1.4.0" do spec/ruby/library/matrix/unitary_spec.rb:17: version_is((Matrix::const_defined?(:VERSION) ? Matrix::VERSION : "0.1.0"), "0.3.0") do spec/ruby/library/openssl/config/freeze_spec.rb:6:version_is(OpenSSL::VERSION, ""..."2.2") do spec/ruby/library/stringio/initialize_spec.rb:299: version_is(stringio_version, "0.0.3"..."0.1.1") spec/ruby/library/time/to_datetime_spec.rb:17: version_is(date_version, '3.2.3') do ``` -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/