1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/nkf/nkf.c (rb_nkf_enc_get): don't replicate encoding.

[ruby-dev:36575]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2008-10-04 10:06:26 +00:00
parent 0b18a77e7d
commit a6e736e09d
2 changed files with 5 additions and 3 deletions

View file

@ -1,3 +1,8 @@
Sat Oct 4 19:02:59 2008 NARUSE, Yui <naruse@ruby-lang.org>
* ext/nkf/nkf.c (rb_nkf_enc_get): don't replicate encoding.
[ruby-dev:36575]
Sat Oct 4 18:47:22 2008 NARUSE, Yui <naruse@ruby-lang.org> Sat Oct 4 18:47:22 2008 NARUSE, Yui <naruse@ruby-lang.org>
* ext/stringio/stringio.c (strio_external_encoding): defined. * ext/stringio/stringio.c (strio_external_encoding): defined.

View file

@ -69,9 +69,6 @@ rb_encoding* rb_nkf_enc_get(const char *name)
idx = rb_enc_find_index(nkf_enc_name(nkf_enc_to_base_encoding(nkf_enc))); idx = rb_enc_find_index(nkf_enc_name(nkf_enc_to_base_encoding(nkf_enc)));
if (idx < 0) { if (idx < 0) {
idx = rb_define_dummy_encoding(name); idx = rb_define_dummy_encoding(name);
} else {
rb_encoding *rb_enc = rb_enc_from_index(idx);
idx = rb_enc_replicate(name, rb_enc);
} }
} }
return rb_enc_from_index(idx); return rb_enc_from_index(idx);