Skip to content
On this page

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

class · Ruby 3.4

Prism::RangeNode

< Prism::Node 14 instance methods 2 class methods

Represents the use of the .. or ... operators.

1..2
^^^^

c if a =~ /left/ ... b =~ /right/
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Class methods 2

Instance methods 14

Attributes
Read

The left-hand side of the range, if present. It can be either nil or any [non-void expression](github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).

1...
^

hello...goodbye
^^^^^
Read

The right-hand side of the range, if present. It can be either nil or any [non-void expression](github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).

..5
  ^

1...foo
    ^^^

If neither right-hand or left-hand side was included, this will be a MissingNode.