ruby-changes:2089
From: ko1@a...
Date: 1 Oct 2007 10:58:52 +0900
Subject: [ruby-changes:2089] nobu - Ruby:r13580 (trunk): * ruby.c (require_libraries): use require method instead of calling
nobu 2007-10-01 10:58:44 +0900 (Mon, 01 Oct 2007)
New Revision: 13580
Modified files:
trunk/ChangeLog
trunk/ruby.c
Log:
* ruby.c (require_libraries): use require method instead of calling
rb_require directly. [ruby-dev:31322]
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ruby.c?r1=13580&r2=13579
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13580&r2=13579
Index: ChangeLog
===================================================================
--- ChangeLog (revision 13579)
+++ ChangeLog (revision 13580)
@@ -1,3 +1,8 @@
+Mon Oct 1 10:58:42 2007 Nobuyoshi Nakada <nobu@r...>
+
+ * ruby.c (require_libraries): use require method instead of calling
+ rb_require directly. [ruby-dev:31322]
+
Mon Oct 1 10:52:30 2007 Nobuyoshi Nakada <nobu@r...>
* eval.c (ruby_options), ruby.c (proc_options, process_options): not
Index: ruby.c
===================================================================
--- ruby.c (revision 13579)
+++ ruby.c (revision 13580)
@@ -413,25 +413,24 @@
}
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;
}
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml