1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext/-test-/load/protect/protect.c
nobu 6f968cab15 load.c: fix rb_load_protect condition
* load.c (rb_load_protect): fix the condition to load the found
  file.  fixup of r59155.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-24 05:22:23 +00:00

19 lines
412 B
C

#include <ruby.h>
static VALUE
load_protect(int argc, VALUE *argv, VALUE self)
{
int state;
VALUE path, wrap;
rb_scan_args(argc, argv, "11", &path, &wrap);
rb_load_protect(path, RTEST(wrap), &state);
if (state) rb_jump_tag(state);
return Qnil;
}
void
Init_protect(void)
{
VALUE mod = rb_define_module("Bug");
rb_define_singleton_method(mod, "load_protect", load_protect, -1);
}