Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

class method

Prism::Pattern.new

new(query)

Create a new pattern with the given query. The query should be a string containing a Ruby pattern matching expression.

See also #combine_and #combine_or also in 4.0 · 3.4