Project

General

Profile

Actions

Bug #19260

closed

ruby/spec is failed with Ruby 3.3

Added by hsbt (Hiroshi SHIBATA) over 1 year ago. Updated over 1 year ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:111432]

Description

After bumping version, we got the some fails with ruby/spec.

https://github.com/ruby/ruby/actions/runs/3778576412/jobs/6423166914

  1)
  Literal Regexps handles a lookbehind with ss characters ERROR
  RegexpError: invalid pattern in look-behind: /(?<!dss)/i
  /home/runner/work/ruby/ruby/src/spec/ruby/language/regexp_spec.rb:120:in `block (3 levels) in <top (required)>'
  /home/runner/work/ruby/ruby/src/spec/ruby/language/regexp_spec.rb:4:in `<top (required)>'
  
  2)
  Float#round does not lose precision during the rounding process FAILED
  Expected 767573.18758 to have same value and type as 767573.18759
  /home/runner/work/ruby/ruby/src/spec/ruby/core/float/round_spec.rb:148:in `block (3 levels) in <top (required)>'
  /home/runner/work/ruby/ruby/src/spec/ruby/core/float/round_spec.rb:3:in `<top (required)>'
  
  3)
  Encoding#replicate has been removed FAILED
  Expected #<Encoding:US-ASCII>.respond_to? :replicate, true
  to be falsy but was true
  /home/runner/work/ruby/ruby/src/spec/ruby/core/encoding/replicate_spec.rb:72:in `block (3 levels) in <top (required)>'
  /home/runner/work/ruby/ruby/src/spec/ruby/core/encoding/replicate_spec.rb:4:in `<top (required)>'

Updated by ko1 (Koichi Sasada) over 1 year ago

https://github.com/ruby/ruby/actions/runs/3778576415/jobs/6423165914

ruby 3.3.0dev (2022-12-25T23:46:59Z master 2a6dbf03a2) [i686-linux-gnu]

  1)
  Literal Regexps handles a lookbehind with ss characters ERROR
  RegexpError: invalid pattern in look-behind: /(?<!dss)/i
  /home/runner/work/ruby/ruby/src/spec/ruby/language/regexp_spec.rb:120:in `block (3 levels) in <top (required)>'
  /home/runner/work/ruby/ruby/src/spec/ruby/language/regexp_spec.rb:4:in `<top (required)>'
  
  2)
  Integer#<< (with n << m) when m is a bignum or larger than int raises NoMemoryError when m > 0 and n != 0 ERROR
  Expected NoMemoryError
  but got: RangeError (shift width too big)
  /home/runner/work/ruby/ruby/src/spec/ruby/core/integer/left_shift_spec.rb:203:in `<<'
  /home/runner/work/ruby/ruby/src/spec/ruby/core/integer/left_shift_spec.rb:203:in `block (6 levels) in <top (required)>'
  /home/runner/work/ruby/ruby/src/spec/ruby/core/integer/left_shift_spec.rb:203:in `block (5 levels) in <top (required)>'
  /home/runner/work/ruby/ruby/src/spec/ruby/core/integer/left_shift_spec.rb:202:in `each'
  /home/runner/work/ruby/ruby/src/spec/ruby/core/integer/left_shift_spec.rb:202:in `block (4 levels) in <top (required)>'
  /home/runner/work/ruby/ruby/src/spec/ruby/core/integer/left_shift_spec.rb:3:in `<top (required)>'
  
  3)
  Encoding#replicate has been removed FAILED
  Expected #<Encoding:US-ASCII>.respond_to? :replicate, true
  to be falsy but was true
  /home/runner/work/ruby/ruby/src/spec/ruby/core/encoding/replicate_spec.rb:72:in `block (3 levels) in <top (required)>'
  /home/runner/work/ruby/ruby/src/spec/ruby/core/encoding/replicate_spec.rb:4:in `<top (required)>'
  
  4)
  Float#round does not lose precision during the rounding process FAILED
  Expected 767573.18758 to have same value and type as 767573.18759
  /home/runner/work/ruby/ruby/src/spec/ruby/core/float/round_spec.rb:148:in `block (3 levels) in <top (required)>'
  /home/runner/work/ruby/ruby/src/spec/ruby/core/float/round_spec.rb:3:in `<top (required)>'
  
  5)
  Integer#>> (with n >> m) when m is a bignum or larger than int raises NoMemoryError when m < 0 and n != 0 ERROR
  Expected NoMemoryError
  but got: RangeError (shift width too big)
  /home/runner/work/ruby/ruby/src/spec/ruby/core/integer/right_shift_spec.rb:225:in `>>'
  /home/runner/work/ruby/ruby/src/spec/ruby/core/integer/right_shift_spec.rb:225:in `block (6 levels) in <top (required)>'
  /home/runner/work/ruby/ruby/src/spec/ruby/core/integer/right_shift_spec.rb:225:in `block (5 levels) in <top (required)>'
  /home/runner/work/ruby/ruby/src/spec/ruby/core/integer/right_shift_spec.rb:224:in `each'
  /home/runner/work/ruby/ruby/src/spec/ruby/core/integer/right_shift_spec.rb:224:in `block (4 levels) in <top (required)>'
  /home/runner/work/ruby/ruby/src/spec/ruby/core/integer/right_shift_spec.rb:3:in `<top (required)>'

Updated by hsbt (Hiroshi SHIBATA) over 1 year ago

I postponed enabling them at Ruby 3.3 because CI is always failed.

https://github.com/ruby/ruby/commit/a236661a62dc89173dcdd9e071365929db1201a7

We should track them in this ticket.

Updated by Eregon (Benoit Daloze) over 1 year ago

Going in the order of https://github.com/ruby/ruby/commit/a236661a62dc89173dcdd9e071365929db1201a7

There were also some new specs for #19150 in ruby/spec, I switched to ArgumentError and adjusted the specs so that's done.

BTW, this is probably useful to track remaining items:

git grep -P 'ruby_bug.+"3.4"'
git grep -P 'ruby_version_is.+"3.4"'
git grep -P '\b3\.3\b'

Updated by Eregon (Benoit Daloze) over 1 year ago

  • Status changed from Open to Closed

All good now, thanks for creating this ticket.

Updated by Eregon (Benoit Daloze) over 1 year ago

With git grep -P '\b3\.3\b', I found:

lib/did_you_mean.rb:116:  # TODO: Remove on 3.3:
lib/did_you_mean.rb:135:  # TODO: Remove on 3.3:

cc @yuki24 (Yuki Nishijima)

re.c:3851:        rb_warn_deprecated_to_remove("3.3", "3rd argument to Regexp.new", "2nd argument");

handled by https://bugs.ruby-lang.org/issues/18797 and https://github.com/ruby/ruby/pull/7039

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0