Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

class method

Ruby::Prism.scope

scope(locals: [], forwarding: [])

Create a new scope with the given locals and forwarding options that is suitable for passing into one of the Ruby::Prism.* methods that accepts the scopes option.

: (?locals: Array[Symbol], ?forwarding: Array[Symbol]) -> Scope

See also .load .lex_compat