Represents the use of the ‘in` keyword in a case statement.
case a; in b then c end ^^^^^^^^^^^
Represents assigning to an index.
foo[bar], = 1 ^^^^^^^^ begin rescue => foo[bar] ^^^^^^^^ end for foo[bar] in baz do end ^^^^^^^^
Represents a regular expression literal that contains interpolation.
/foo #{bar} baz/ ^^^^^^^^^^^^^^^^
Represents a symbol literal that contains interpolation.
:"foo #{bar} baz" ^^^^^^^^^^^^^^^^^
Represents reading from the implicit ‘it` local variable.
-> { it } ^^
Represents a keyword rest parameter to a method, block, or lambda definition.
def a(**b) ^^^ end
Represents reading a local variable. Note that this requires that a local variable of the same name has already been written to in the same scope, otherwise it is parsed as a method call.
foo ^^^
Represents writing to a local variable in a context that doesn’t have an explicit value.
foo, bar = baz ^^^ ^^^
Represents writing local variables using a regular expression match with named capture groups.
/(?<foo>bar)/ =~ baz ^^^^^^^^^^^^^^^^^^^^
Represents a write to a multi-target expression.
a, b, c = 1, 2, 3 ^^^^^^^^^^^^^^^^^
Represents the use of the ‘^` operator for pinning an expression in a pattern matching expression.
foo in ^(bar) ^^^^^^
Represents the use of the ‘..` or `…` operators.
1..2 ^^^^ c if a =~ /left/ ... b =~ /right/ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Represents a rest parameter to a method, block, or lambda definition.
def a(*b) ^^ end
This node wraps a constant write to indicate that when the value is written, it should have its shareability state modified.
# shareable_constant_value: literal C = { a: 1 } ^^^^^^^^^^^^
Represents a set of statements contained within some scope.
foo; bar; baz ^^^^^^^^^^^^^
Resolv::Hosts
is a hostname resolver that uses the system hosts file.