mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* transcode.c (conv_init): check empty name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8b04d998ae
commit
96ae1f008f
2 changed files with 10 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Fri Aug 15 09:33:48 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* transcode.c (conv_init): check empty name.
|
||||||
|
|
||||||
Fri Aug 15 09:03:54 2008 Tanaka Akira <akr@fsij.org>
|
Fri Aug 15 09:03:54 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* transcode.c (econv_init): don't create dummy encoding if
|
* transcode.c (econv_init): don't create dummy encoding if
|
||||||
|
|
10
transcode.c
10
transcode.c
|
@ -1497,10 +1497,12 @@ econv_init(int argc, VALUE *argv, VALUE self)
|
||||||
rb_raise(rb_eArgError, "encoding convewrter not supported (from %s to %s)", sname, dname);
|
rb_raise(rb_eArgError, "encoding convewrter not supported (from %s to %s)", sname, dname);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!senc)
|
if (*sname && *dname) { /* check "" to "universal_newline" */
|
||||||
senc = make_dummy_encoding(sname);
|
if (!senc)
|
||||||
if (!denc)
|
senc = make_dummy_encoding(sname);
|
||||||
denc = make_dummy_encoding(dname);
|
if (!denc)
|
||||||
|
denc = make_dummy_encoding(dname);
|
||||||
|
}
|
||||||
|
|
||||||
ec->source_encoding = senc;
|
ec->source_encoding = senc;
|
||||||
ec->destination_encoding = denc;
|
ec->destination_encoding = denc;
|
||||||
|
|
Loading…
Reference in a new issue