Project

General

Profile

Actions

Bug #20084

closed

Breaking change with Regexp.new on 3.3.0

Added by paddor (Patrik Wenger) 5 months ago. Updated 4 months ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux]
[ruby-core:115889]

Description

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

Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #18797: Third argument to Regexp.new is a bit brokenClosedjeremyevans0 (Jeremy Evans)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0