Class: RubyVM::Instruction

Inherits:
Object show all
Defined in:
ext/internal/vm/instruction/instruction.c

Instance Method Summary collapse

Constructor Details

#new(*operands) ⇒ Instruction

Create a new instruction with the given operands.



21
22
23
24
25
26
# File 'ext/internal/vm/instruction/instruction.c', line 21

static VALUE instruction_initialize(int argc, VALUE * argv, VALUE self)
{
  VALUE operands = rb_ary_new4(argc, argv);
  rb_iv_set(self, "@operands", operands);
  return Qnil;
}

Instance Method Details

#operandsArray

Returns the instructions operands.

Returns:

  • (Array)


34
35
36
37
# File 'ext/internal/vm/instruction/instruction.c', line 34

static VALUE instruction_operands(VALUE self)
{
  return rb_iv_get(self, "@operands");
}