Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
RubyVM::InstructionSequence#eval
() -> untyped
iseq.eval → obj
iseq.c
View on GitHub ↗
static VALUE
iseqw_eval(VALUE self)
{
return rb_iseq_eval(iseqw_check(self));
}
Evaluates the instruction sequence and returns the result.
Example
RubyVM::InstructionSequence.compile("1 + 2").eval #=> 3