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 | 661f93b22a98b49376c7dc826663fa26d67014c0 (patch) | |
| tree | eb218e3658293e98f7b66910763d38450509a1ad /ruby.c | |
| parent | a1ef0240bfdd3048a028ba2a9a49649eac8d7171 (diff) | |
| download | ruby-661f93b22a98b49376c7dc826663fa26d67014c0.tar.gz ruby-661f93b22a98b49376c7dc826663fa26d67014c0.tar.xz ruby-661f93b22a98b49376c7dc826663fa26d67014c0.zip | |
* 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: http://svn.ruby-lang.org/repos/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; |
