mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ruby.c (load_file_internal): use ASCII-8BIT to prevent conversion.
[ruby-core:19579] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bd92ab89c0
commit
bc4bc3a80f
2 changed files with 6 additions and 3 deletions
|
@ -1,4 +1,7 @@
|
|||
Wed Oct 29 09:23:01 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Wed Oct 29 09:30:04 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ruby.c (load_file_internal): use ASCII-8BIT to prevent conversion.
|
||||
[ruby-core:19579]
|
||||
|
||||
* ruby.c (load_file_internal): cache common interned IDs.
|
||||
|
||||
|
|
4
ruby.c
4
ruby.c
|
@ -1255,7 +1255,7 @@ load_file_internal(VALUE arg)
|
|||
int no_ext_enc = !opt->ext.enc.name;
|
||||
int no_int_enc = !opt->intern.enc.name;
|
||||
|
||||
enc = rb_usascii_encoding();
|
||||
enc = rb_ascii8bit_encoding();
|
||||
rb_funcall(f, set_encoding, 1, rb_enc_from_encoding(enc));
|
||||
|
||||
if (opt->xflag) {
|
||||
|
@ -1356,7 +1356,7 @@ load_file_internal(VALUE arg)
|
|||
enc = rb_locale_encoding();
|
||||
}
|
||||
else {
|
||||
enc = rb_usascii_encoding();
|
||||
enc = rb_ascii8bit_encoding();
|
||||
}
|
||||
rb_funcall(f, set_encoding, 1, rb_enc_from_encoding(enc));
|
||||
tree = (NODE *)rb_parser_compile_file(parser, fname, f, line_start);
|
||||
|
|
Loading…
Reference in a new issue