class SyntaxTree::YARV::NewRange
~~~
p (x..y), (x…y)
y = 1
x = 0
~~~ruby
### Usage
is excluded.
takes one argument which is 0 if the end is included or 1 if the end value
stack. It pops both of them off, and then pushes on the new range. It
`newrange` creates a new range object from the top two values on the
### Summary
def ==(other)
def ==(other) other.is_a?(NewRange) && other.exclude_end == exclude_end end
def call(vm)
def call(vm) vm.push(Range.new(*vm.pop(2), exclude_end == 1)) end
def deconstruct_keys(_keys)
def deconstruct_keys(_keys) { exclude_end: exclude_end } end
def disasm(fmt)
def disasm(fmt) fmt.instruction("newrange", [fmt.object(exclude_end)]) end
def initialize(exclude_end)
def initialize(exclude_end) @exclude_end = exclude_end end
def length
def length 2 end
def pops
def pops 2 end
def pushes
def pushes 1 end
def to_a(_iseq)
def to_a(_iseq) [:newrange, exclude_end] end