[ruby-core:123732] [Ruby Bug#21674] Possible regression in return case in statement

From: "jandudulski (Jan Dudulski) via ruby-core" <ruby-core@...>
Date: 2025-11-08 09:55:00 UTC
List: ruby-core #123732
Issue #21674 has been updated by jandudulski (Jan Dudulski).

Description updated

Typo

----------------------------------------
Bug #21674: Possible regression in return case in statement
https://bugs.ruby-lang.org/issues/21674#change-115119

* Author: jandudulski (Jan Dudulski)
* Status: Open
* ruby -v: 3.4.6
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
Suddenly my code started failing in Ruby 3.4.6 and 3.4.7. Shortest code example:

``` ruby
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`.



-- 
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/lists/ruby-core.ml.ruby-lang.org/

In This Thread