summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--ruby.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1379022f12..627590a0e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Jun 9 15:37:38 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * ruby.c (require_libraries): req_list may be NULL. [ruby-dev:35008]
+
Mon Jun 9 14:18:01 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vm_core.h (struct rb_vm_struct): moved src_encoding_index,
diff --git a/ruby.c b/ruby.c
index 121ddc6432..f6c3a43f80 100644
--- a/ruby.c
+++ b/ruby.c
@@ -455,7 +455,7 @@ require_libraries(struct cmdline_options *opt)
ID require = rb_intern("require");
Init_ext(); /* should be called here for some reason :-( */
- while (RARRAY_LEN(list)) {
+ while (list && RARRAY_LEN(list) > 0) {
VALUE feature = rb_ary_shift(list);
rb_funcall2(rb_vm_top_self(), require, 1, &feature);
}