diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-02 01:13:15 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-02 01:13:15 +0000 |
commit | 6a9bfa23bf686b29e85d78a1566950a533e4b8a8 (patch) | |
tree | eb218e3658293e98f7b66910763d38450509a1ad /ruby.c | |
parent | 601616d6ff9b6ed2420e6b122f8ed48d5406b175 (diff) | |
download | ruby-6a9bfa23bf686b29e85d78a1566950a533e4b8a8.tar.gz |
* ruby.c (load_file): parse shebang in us-ascii. a patch from
sheepman <sheepman AT sheepman.sakura.ne.jp> in [ruby-dev:33955]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r-- | ruby.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1155,6 +1155,9 @@ load_file(VALUE parser, const char *fname, int script, struct cmdline_options *o int no_src_enc = !opt->src.enc.name; int no_ext_enc = !opt->ext.enc.name; + enc = rb_usascii_encoding(); + rb_funcall(f, rb_intern("set_encoding"), 1, rb_enc_from_encoding(enc)); + if (opt->xflag) { forbid_setid("-x"); opt->xflag = Qfalse; |