diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-17 15:03:56 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-17 15:03:56 +0000 |
commit | fe3987ae9605772f20b40bcce1b3ca644f048221 (patch) | |
tree | 58c72c1ebc6c22135c152fcafabf5b1e3022e973 /ext/stringio/stringio.c | |
parent | 0052259d5e9934de20411943ce2077909e82d1d3 (diff) | |
download | ruby-fe3987ae9605772f20b40bcce1b3ca644f048221.tar.gz |
* ext/stringio/stringio.c (strio_init): use default external encoding
if nothing is given. a patch from sheepman <sheepman AT
sheepman.sakura.ne.jp> in [ruby-dev:33159].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/stringio/stringio.c')
-rw-r--r-- | ext/stringio/stringio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c index 8aff363b33..6b867084df 100644 --- a/ext/stringio/stringio.c +++ b/ext/stringio/stringio.c @@ -187,7 +187,7 @@ strio_init(int argc, VALUE *argv, struct StringIO *ptr) ptr->flags = OBJ_FROZEN(string) ? FMODE_READABLE : FMODE_READWRITE; break; case 0: - string = rb_str_new("", 0); + string = rb_enc_str_new("", 0, rb_default_external_encoding()); ptr->flags = FMODE_READWRITE; break; } |