[ruby-core:115889] [Ruby master Bug#20084] Breaking change with Regexp.new on 3.3.0

Issue #20084 has been reported by paddor (Patrik Wenger). ---------------------------------------- Bug #20084: Breaking change with Regexp.new on 3.3.0 https://bugs.ruby-lang.org/issues/20084 * Author: paddor (Patrik Wenger) * Status: Open * Priority: Normal * ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux] * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- Regexp.new used to take up to 3 arguments, but now only 1..2 are allowed: ``` [1] pry(main)> Regexp.new 'abc', 'i', 'n' ArgumentError: wrong number of arguments (given 3, expected 1..2) from (pry):1:in `initialize' ``` On 3.2.2: ``` [1] pry(main)> Regexp.new 'abc', 'i', 'n' => /abc/in ``` -- https://bugs.ruby-lang.org/

Issue #20084 has been updated by hsbt (Hiroshi SHIBATA). Status changed from Open to Closed It's intentional changes. see https://bugs.ruby-lang.org/issues/18797 ---------------------------------------- Bug #20084: Breaking change with Regexp.new on 3.3.0 https://bugs.ruby-lang.org/issues/20084#change-105847 * Author: paddor (Patrik Wenger) * Status: Closed * Priority: Normal * ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux] * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- Regexp.new used to take up to 3 arguments, but now only 1..2 are allowed: ``` [1] pry(main)> Regexp.new 'abc', 'i', 'n' ArgumentError: wrong number of arguments (given 3, expected 1..2) from (pry):1:in `initialize' ``` On 3.2.2: ``` [1] pry(main)> Regexp.new 'abc', 'i', 'n' => /abc/in ``` -- https://bugs.ruby-lang.org/

Issue #20084 has been updated by nobu (Nobuyoshi Nakada). I think we needed to add it to Compatibility issues in NEWS.md. ---------------------------------------- Bug #20084: Breaking change with Regexp.new on 3.3.0 https://bugs.ruby-lang.org/issues/20084#change-105848 * Author: paddor (Patrik Wenger) * Status: Closed * Priority: Normal * ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux] * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- Regexp.new used to take up to 3 arguments, but now only 1..2 are allowed: ``` [1] pry(main)> Regexp.new 'abc', 'i', 'n' ArgumentError: wrong number of arguments (given 3, expected 1..2) from (pry):1:in `initialize' ``` On 3.2.2: ``` [1] pry(main)> Regexp.new 'abc', 'i', 'n' => /abc/in ``` -- https://bugs.ruby-lang.org/

Issue #20084 has been updated by paddor (Patrik Wenger). hsbt (Hiroshi SHIBATA) wrote in #note-2:
It's intentional changes. see https://bugs.ruby-lang.org/issues/18797
Thanks. nobu (Nobuyoshi Nakada) wrote in #note-3:
I think we needed to add it to Compatibility issues in NEWS.md.
Yeah that would be nice. ---------------------------------------- Bug #20084: Breaking change with Regexp.new on 3.3.0 https://bugs.ruby-lang.org/issues/20084#change-105884 * Author: paddor (Patrik Wenger) * Status: Closed * Priority: Normal * ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux] * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- Regexp.new used to take up to 3 arguments, but now only 1..2 are allowed: ``` [1] pry(main)> Regexp.new 'abc', 'i', 'n' ArgumentError: wrong number of arguments (given 3, expected 1..2) from (pry):1:in `initialize' ``` On 3.2.2: ``` [1] pry(main)> Regexp.new 'abc', 'i', 'n' => /abc/in ``` -- https://bugs.ruby-lang.org/
participants (3)
-
hsbt (Hiroshi SHIBATA)
-
nobu (Nobuyoshi Nakada)
-
paddor (Patrik Wenger)