From 014d1ae20d939d2d522634ad54cc20036253314b Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 1 Oct 2007 01:58:44 +0000 Subject: * ruby.c (require_libraries): use require method instead of calling rb_require directly. [ruby-dev:31322] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ruby.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'ruby.c') diff --git a/ruby.c b/ruby.c index 784d246448..0d94e6055c 100644 --- a/ruby.c +++ b/ruby.c @@ -413,25 +413,24 @@ add_modules(const char *mod) } extern void Init_ext(void); +extern VALUE rb_vm_top_self(void); static void require_libraries(void) { struct req_list *list = req_list.head.next; struct req_list *tmp; + ID require = rb_intern("require"); Init_ext(); /* should be called here for some reason :-( */ req_list.last = 0; while (list) { - int state; - - rb_protect((VALUE (*)(VALUE))rb_require, (VALUE)list->name, &state); - if (state) - rb_jump_tag(state); + VALUE feature = rb_str_new2(list->name); tmp = list->next; free(list->name); free(list); list = tmp; + rb_funcall2(rb_vm_top_self(), require, 1, &feature); } req_list.head.next = 0; } -- cgit v1.2.3