diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-02-10 07:55:40 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-02-10 07:55:40 +0000 |
commit | 1995213e4bb0b6411a4a4da60c53e37bec3ba4ec (patch) | |
tree | ba2af51029a01ca4ac835617ea86c36621db7d64 /ruby.c | |
parent | b1f086d01492e4cc69f38d965775144f92cd5506 (diff) |
* ruby.c (load_file): avoid SEGV on '#' only input.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r-- | ruby.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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] == '!') { |