зеркало из https://github.com/github/ruby.git
* marshal.c (w_object, r_object0): use RHASH_IFNONE but not ifnone
directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
6ebdf24500
Коммит
914b36e3f9
|
@ -1,3 +1,8 @@
|
|||
Wed Nov 11 09:36:02 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* marshal.c (w_object, r_object0): use RHASH_IFNONE but not ifnone
|
||||
directly.
|
||||
|
||||
Wed Nov 11 08:32:45 2009 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* thread.c (blocking_region_begin): define before BLOCKING_REGION.
|
||||
|
|
|
@ -778,7 +778,7 @@ w_object(VALUE obj, struct dump_arg *arg, int limit)
|
|||
|
||||
case T_HASH:
|
||||
w_uclass(obj, rb_cHash, arg);
|
||||
if (NIL_P(RHASH(obj)->ifnone)) {
|
||||
if (NIL_P(RHASH_IFNONE(obj))) {
|
||||
w_byte(TYPE_HASH, arg);
|
||||
}
|
||||
else if (FL_TEST(obj, FL_USER2)) {
|
||||
|
@ -790,8 +790,8 @@ w_object(VALUE obj, struct dump_arg *arg, int limit)
|
|||
}
|
||||
w_long(RHASH_SIZE(obj), arg);
|
||||
rb_hash_foreach(obj, hash_each, (st_data_t)&c_arg);
|
||||
if (!NIL_P(RHASH(obj)->ifnone)) {
|
||||
w_object(RHASH(obj)->ifnone, arg, limit);
|
||||
if (!NIL_P(RHASH_IFNONE(obj))) {
|
||||
w_object(RHASH_IFNONE(obj), arg, limit);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1564,7 +1564,7 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod)
|
|||
rb_hash_aset(v, key, value);
|
||||
}
|
||||
if (type == TYPE_HASH_DEF) {
|
||||
RHASH(v)->ifnone = r_object(arg);
|
||||
RHASH_IFNONE(v) = r_object(arg);
|
||||
}
|
||||
v = r_leave(v, arg);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче