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 | 2ecef09e3f7e7c0d5d3106a518ad05615af405c3 (patch) | |
tree | 58c72c1ebc6c22135c152fcafabf5b1e3022e973 /ext/stringio | |
parent | b18593cfbcdc4b039d08ac0b3002f3c7ce40e745 (diff) | |
download | ruby-2ecef09e3f7e7c0d5d3106a518ad05615af405c3.tar.gz ruby-2ecef09e3f7e7c0d5d3106a518ad05615af405c3.tar.xz ruby-2ecef09e3f7e7c0d5d3106a518ad05615af405c3.zip |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@15087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/stringio')
-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 8aff363b3..6b867084d 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; } |