VALUE rb_f_eval_compiled(int argc, VALUE *argv, VALUE self) { VALUE scope, fname, iseqval; const char *file = 0; rb_scan_args(argc, argv, "11", &fname, &scope); iseqval = loadISeqFromFile(RhoPreparePath(fname)); return eval_string_with_cref( self, iseqval, scope, 0, file, 1 ); //return eval_iseq_with_scope(self, scope, iseqval ); }
/* string eval under the class/module context */ static VALUE eval_under(VALUE under, VALUE self, VALUE src, const char *file, int line) { NODE *cref = vm_cref_push(GET_THREAD(), under, NOEX_PUBLIC); if (rb_safe_level() >= 4) { StringValue(src); } else { SafeStringValue(src); } return eval_string_with_cref(self, src, Qnil, cref, file, line); }
VALUE rb_f_eval_compiled(int argc, VALUE *argv, VALUE self) { VALUE scope, fname, iseqval, res; const char *file = 0; //rb_gc_disable(); rb_scan_args(argc, argv, "11", &fname, &scope); //RAWLOG_INFO1("eval_compiled: %s", RSTRING_PTR(fname)); iseqval = loadISeqFromFile(RhoPreparePath(fname)); res = eval_string_with_cref( self, iseqval, scope, 0, file, 1 ); //rb_gc_enable(); return res; //return eval_iseq_with_scope(self, scope, iseqval ); }
static VALUE eval_string(VALUE self, VALUE src, VALUE scope, const char *file, int line) { return eval_string_with_cref(self, src, scope, 0, file, line); }