Project

General

Profile

Actions

Bug #21674

open

Possible regression in return case in statement

Bug #21674: Possible regression in return case in statement

Added by jandudulski (Jan Dudulski) about 5 hours ago. Updated about 2 hours ago.

Status:
Open
Assignee:
Target version:
-
[ruby-core:123731]

Description

Suddenly my code started failing in Ruby 3.4.6 and 3.4.7. Shortest code example:

args = [:increased]
context = Data.define(:event).new(:decreased)
case args
in [event]
  context.event in ^event
end

In Ruby prior to 3.4.6 it returns false (as expected) but in 3.4.6 and 3.4.7 it returns :decreased. context.event in ^event still returns false.

Actions

Also available in: PDF Atom