* marshal.c (w_encoding): encodings need extra depth.
[ruby-core:24100] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
01430b6e69
commit
4bef732db1
@ -1,3 +1,8 @@
|
|||||||
|
Wed Jul 1 08:46:11 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* marshal.c (w_encoding): encodings need extra depth.
|
||||||
|
[ruby-core:24100]
|
||||||
|
|
||||||
Wed Jul 1 06:47:09 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Jul 1 06:47:09 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* enum.c (enum_grep): gets rid of type-punning calls.
|
* enum.c (enum_grep): gets rid of type-punning calls.
|
||||||
|
@ -493,12 +493,12 @@ w_encoding(VALUE obj, long num, struct dump_call_arg *arg)
|
|||||||
/* special treatment for US-ASCII and UTF-8 */
|
/* special treatment for US-ASCII and UTF-8 */
|
||||||
if (encidx == rb_usascii_encindex()) {
|
if (encidx == rb_usascii_encindex()) {
|
||||||
w_symbol(rb_intern("E"), arg->arg);
|
w_symbol(rb_intern("E"), arg->arg);
|
||||||
w_object(Qfalse, arg->arg, arg->limit);
|
w_object(Qfalse, arg->arg, arg->limit + 1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (encidx == rb_utf8_encindex()) {
|
else if (encidx == rb_utf8_encindex()) {
|
||||||
w_symbol(rb_intern("E"), arg->arg);
|
w_symbol(rb_intern("E"), arg->arg);
|
||||||
w_object(Qtrue, arg->arg, arg->limit);
|
w_object(Qtrue, arg->arg, arg->limit + 1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -511,7 +511,7 @@ w_encoding(VALUE obj, long num, struct dump_call_arg *arg)
|
|||||||
name = (st_data_t)rb_str_new2(rb_enc_name(enc));
|
name = (st_data_t)rb_str_new2(rb_enc_name(enc));
|
||||||
st_insert(arg->arg->encodings, (st_data_t)rb_enc_name(enc), name);
|
st_insert(arg->arg->encodings, (st_data_t)rb_enc_name(enc), name);
|
||||||
} while (0);
|
} while (0);
|
||||||
w_object(name, arg->arg, arg->limit);
|
w_object(name, arg->arg, arg->limit + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user