From: marcandre-ruby-core@... Date: 2020-12-20T15:28:57+00:00 Subject: [ruby-core:101556] [Ruby master Feature#17411] Allow expressions in pattern matching Issue #17411 has been updated by marcandre (Marc-Andre Lafortune). That's perfect ���� Any chance Nobu can come up with a patch quickly? ---------------------------------------- Feature #17411: Allow expressions in pattern matching https://bugs.ruby-lang.org/issues/17411#change-89340 * Author: zverok (Victor Shepelev) * Status: Open * Priority: Normal ---------------------------------------- Code: ```ruby version = {name: '2.6', released_at: Time.new(2018, 12, 25)} version in {released_at: Time.new(2010)..Time.new(2020)} # ^ syntax error, unexpected '.', expecting '}' # This works: range = Time.new(2010)..Time.new(2020) version in {released_at: ^range} #=> true ``` (Fails with all versions of the pattern matching, `in`, `=>` and `case ... in`, and on Ruby 2.7 too.) Am I missing something about the syntax?.. -- https://bugs.ruby-lang.org/ Unsubscribe: