summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-09 06:40:02 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-09 06:40:02 +0000
commit66054b9e3d3c5cfe05db0fbda565fc2b05b72a5e (patch)
tree20779987a0b70fced8fb5339bad7d81d764da5b8 /ruby.c
parente39b93b86e0e5c6da6865b1dae3e099ef3d4eae3 (diff)
* ruby.c (require_libraries): req_list may be NULL. [ruby-dev:35008]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c2
1 files changed, 1 insertions, 1 deletions
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);
}