diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-17 08:27:39 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-17 08:27:39 +0000 |
commit | 406a08c4d7937255d9aa01c7a7144125fc8c0dee (patch) | |
tree | 8dd7e35f421f3e410d1cc405a7dc2c49fa83dad9 /ruby.c | |
parent | 2aab471a2c4d76ab8decbdc04d7fd8e1fd82c2e8 (diff) |
merge revision(s) 64900: [Backport #15190]
Just a shebang is valid code
[ruby-core:89240] [Bug #15190]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@65113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r-- | ruby.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -1798,11 +1798,7 @@ load_file_internal(VALUE argp_v) c = rb_io_getbyte(f); if (c == INT2FIX('#')) { c = rb_io_getbyte(f); - if (c == INT2FIX('!')) { - line = rb_io_gets(f); - if (NIL_P(line)) - return 0; - + if (c == INT2FIX('!') && !NIL_P(line = rb_io_gets(f))) { RSTRING_GETMEM(line, str, len); warn_cr_in_shebang(str, len); if ((p = strstr(str, ruby_engine)) == 0) { |