зеркало из https://github.com/github/ruby.git
* transcode.c (econv_opts): don't use to_sym.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
a517395056
Коммит
e0f064cf3c
|
@ -1,3 +1,7 @@
|
||||||
|
Mon Sep 15 23:37:15 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* transcode.c (econv_opts): don't use to_sym.
|
||||||
|
|
||||||
Mon Sep 15 23:28:28 2008 Tanaka Akira <akr@fsij.org>
|
Mon Sep 15 23:28:28 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* encoding.c (rb_enc_get_index): don't return -1.
|
* encoding.c (rb_enc_get_index): don't return -1.
|
||||||
|
|
|
@ -2287,16 +2287,18 @@ econv_opts(VALUE opt)
|
||||||
|
|
||||||
v = rb_hash_aref(opt, sym_xml);
|
v = rb_hash_aref(opt, sym_xml);
|
||||||
if (!NIL_P(v)) {
|
if (!NIL_P(v)) {
|
||||||
v = rb_convert_type(v, T_SYMBOL, "Symbol", "to_sym");
|
|
||||||
if (v==sym_text) {
|
if (v==sym_text) {
|
||||||
ecflags |= ECONV_XML_TEXT_DECORATOR|ECONV_UNDEF_HEX_CHARREF;
|
ecflags |= ECONV_XML_TEXT_DECORATOR|ECONV_UNDEF_HEX_CHARREF;
|
||||||
}
|
}
|
||||||
else if (v==sym_attr) {
|
else if (v==sym_attr) {
|
||||||
ecflags |= ECONV_XML_ATTR_CONTENT_DECORATOR|ECONV_XML_ATTR_QUOTE_DECORATOR|ECONV_UNDEF_HEX_CHARREF;
|
ecflags |= ECONV_XML_ATTR_CONTENT_DECORATOR|ECONV_XML_ATTR_QUOTE_DECORATOR|ECONV_UNDEF_HEX_CHARREF;
|
||||||
}
|
}
|
||||||
else {
|
else if (TYPE(v) == T_SYMBOL) {
|
||||||
rb_raise(rb_eArgError, "unexpected value for xml option: %s", rb_id2name(SYM2ID(v)));
|
rb_raise(rb_eArgError, "unexpected value for xml option: %s", rb_id2name(SYM2ID(v)));
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
rb_raise(rb_eArgError, "unexpected value for xml option");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
v = rb_hash_aref(opt, sym_universal_newline);
|
v = rb_hash_aref(opt, sym_universal_newline);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче