From: zverok.offline@... Date: 2020-12-19T18:16:33+00:00 Subject: [ruby-core:101546] [Ruby master Bug#17411] Syntax error with . in pattern Issue #17411 has been reported by zverok (Victor Shepelev). ---------------------------------------- Bug #17411: Syntax error with . in pattern https://bugs.ruby-lang.org/issues/17411 * Author: zverok (Victor Shepelev) * Status: Open * Priority: Normal * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- 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: