From 9c33509021eaa0897cce7e836ba4ac82012eada0 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 9 Jun 2008 06:40:02 +0000 Subject: * ruby.c (require_libraries): req_list may be NULL. [ruby-dev:35008] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ruby.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ruby.c') diff --git a/ruby.c b/ruby.c index 121ddc643..f6c3a43f8 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); } -- cgit