Issue #21674 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 3.2: DONTNEED, 3.3: DONTNEED, 3.4: REQUIRED, 4.0: DONE to 3.2: DONTNEED, 3.3: DONTNEED, 3.4: DONE, 4.0: DONE Backported into ruby_3_4 with https://github.com/ruby/ruby/pull/16324. ---------------------------------------- Bug #21674: Possible regression in return case in statement https://bugs.ruby-lang.org/issues/21674#change-117484 * Author: jandudulski (Jan Dudulski) * Status: Closed * Assignee: prism * ruby -v: 3.4.6 * Backport: 3.2: DONTNEED, 3.3: DONTNEED, 3.4: DONE, 4.0: DONE ---------------------------------------- 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/