Class: Peruby::Op::Undef
Overview
undef with optional deterministic blessed-reference release.
Instance Method Summary collapse
-
#initialize(expression) ⇒ Undef
constructor
A new instance of Undef.
- #run(env, _context) ⇒ Object
Methods inherited from Base
#argument_cells, #local_slot, #lvalue, #run_subroutine, #to_callable, #warning_directive?
Constructor Details
#initialize(expression) ⇒ Undef
Returns a new instance of Undef.
366 367 368 |
# File 'lib/peruby/op/call.rb', line 366 def initialize(expression) @expression = expression end |
Instance Method Details
#run(env, _context) ⇒ Object
370 371 372 373 374 375 |
# File 'lib/peruby/op/call.rb', line 370 def run(env, _context) cell = @expression.lvalue(env, :scalar) env.runtime.release(cell.get) cell.set(nil) nil end |