summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-10-01 01:58:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-10-01 01:58:44 +0000
commit4e5d7f248aa1eb2eb60461076ca617045b47d196 (patch)
tree3923fd4a4e37fbc71a0f40b355e815dfd5012b6e
parentf11b94030fa76d8503d8e8307bcbdfaf70537c95 (diff)
downloadruby-4e5d7f248aa1eb2eb60461076ca617045b47d196.tar.gz
ruby-4e5d7f248aa1eb2eb60461076ca617045b47d196.tar.xz
ruby-4e5d7f248aa1eb2eb60461076ca617045b47d196.zip
* ruby.c (require_libraries): use require method instead of calling
rb_require directly. [ruby-dev:31322] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--ruby.c9
2 files changed, 9 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 77c44c0e1..356a6e0a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Oct 1 10:58:42 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * 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@ruby-lang.org>
* eval.c (ruby_options), ruby.c (proc_options, process_options): not
diff --git a/ruby.c b/ruby.c
index 784d24644..0d94e6055 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;
}