diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-30 14:36:09 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-30 14:36:09 +0000 |
commit | 43a9c5a36470224bea23acb42339735efc27702b (patch) | |
tree | f4ab58447115e3b616ed82dd3dcf043de6a5e391 /ruby.c | |
parent | 90229f89a53f942b2aa3a2e583ab717b1e831aa7 (diff) |
merges r20056 from trunk into ruby_1_9_1.
* ruby.c (load_file_internal): should not set script encoding to
ASCII-8BIT.
* ruby.c (load_file_internal): do not auto convert scripts even
when default_internal is set. [ruby-core:19579]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r-- | ruby.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1356,9 +1356,9 @@ load_file_internal(VALUE arg) enc = rb_locale_encoding(); } else { - enc = rb_ascii8bit_encoding(); + enc = rb_usascii_encoding(); } - rb_funcall(f, set_encoding, 1, rb_enc_from_encoding(enc)); + rb_funcall(f, set_encoding, 2, rb_enc_from_encoding(enc), rb_str_new_cstr("-")); tree = (NODE *)rb_parser_compile_file(parser, fname, f, line_start); rb_funcall(f, set_encoding, 1, rb_parser_encoding(parser)); if (script && rb_parser_end_seen_p(parser)) { |