mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* io.c (io_enc_str): should preserve default_external encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b487d9459d
commit
b4f2e2ba07
2 changed files with 4 additions and 2 deletions
|
@ -23,6 +23,8 @@ Mon Dec 24 02:59:32 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
|||
* string.c (str_new_shared): was setting embedding flag of wrong
|
||||
string object. [ruby-dev:32685]
|
||||
|
||||
* io.c (io_enc_str): should preserve default_external encoding.
|
||||
|
||||
Mon Dec 24 02:06:35 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* io.c (rb_f_open): documentation update.
|
||||
|
|
4
io.c
4
io.c
|
@ -1316,9 +1316,9 @@ io_enc_str(VALUE str, rb_io_t *fptr)
|
|||
rb_enc_from_encoding(fptr->enc),
|
||||
rb_enc_from_encoding(fptr->enc2));
|
||||
}
|
||||
else if (fptr->enc) {
|
||||
else {
|
||||
/* just one encoding, so associate it with the string */
|
||||
rb_enc_associate(str, fptr->enc);
|
||||
rb_enc_associate(str, io_read_encoding(fptr));
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue