summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ruby.c b/ruby.c
index f73194bbec..bd7d599ac0 100644
--- a/ruby.c
+++ b/ruby.c
@@ -794,6 +794,7 @@ load_file(fname, script)
c = rb_io_getc(f);
if (c == INT2FIX('#')) {
line = rb_io_gets(f);
+ if (NIL_P(line)) return;
line_start++;
if (RSTRING(line)->len > 2 && RSTRING(line)->ptr[0] == '!') {