From: nobu@... Date: 2020-12-21T07:23:26+00:00 Subject: [ruby-core:101571] [Ruby master Feature#17411] Allow expressions in pattern matching Issue #17411 has been updated by nobu (Nobuyoshi Nakada). https://github.com/ruby/ruby/pull/3956 ---------------------------------------- Feature #17411: Allow expressions in pattern matching https://bugs.ruby-lang.org/issues/17411#change-89356 * 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: