diff --git a/ext/objspace/objspace_dump.c b/ext/objspace/objspace_dump.c index 11204d7ff3..5fa9d98e38 100644 --- a/ext/objspace/objspace_dump.c +++ b/ext/objspace/objspace_dump.c @@ -273,7 +273,7 @@ dump_object(VALUE obj, struct dump_config *dc) case T_HASH: dump_append(dc, ", \"size\":%"PRIuSIZE, (size_t)RHASH_SIZE(obj)); - if (FL_TEST(obj, RHASH_PROC_DEFAULT)) + if (FL_TEST(obj, RHASH_PROC_DEFAULT)) dump_append(dc, ", \"default\":\"%#"PRIxVALUE"\"", RHASH_IFNONE(obj)); break; diff --git a/hash.c b/hash.c index d0386d4fb0..dfb27b83b2 100644 --- a/hash.c +++ b/hash.c @@ -1505,7 +1505,7 @@ rb_hash_dup(VALUE hash) { const VALUE flags = RBASIC(hash)->flags; VALUE ret = hash_dup(hash, rb_obj_class(hash), - flags & (FL_EXIVAR|FL_TAINT|RHASH_PROC_DEFAULT)); + flags & (FL_EXIVAR|FL_TAINT|RHASH_PROC_DEFAULT)); if (flags & FL_EXIVAR) rb_copy_generic_ivar(ret, hash); return ret; @@ -1885,7 +1885,7 @@ rb_hash_default_value(VALUE hash, VALUE key) { if (rb_method_basic_definition_p(CLASS_OF(hash), id_default)) { VALUE ifnone = RHASH_IFNONE(hash); - if (!FL_TEST(hash, RHASH_PROC_DEFAULT)) return ifnone; + if (!FL_TEST(hash, RHASH_PROC_DEFAULT)) return ifnone; if (key == Qundef) return Qnil; return rb_funcall(ifnone, id_yield, 2, hash, key); } @@ -3302,7 +3302,7 @@ rb_hash_to_h(VALUE hash) } if (rb_obj_class(hash) != rb_cHash) { const VALUE flags = RBASIC(hash)->flags; - hash = hash_dup(hash, rb_cHash, flags & RHASH_PROC_DEFAULT); + hash = hash_dup(hash, rb_cHash, flags & RHASH_PROC_DEFAULT); } return hash; } @@ -3546,7 +3546,7 @@ hash_equal(VALUE hash1, VALUE hash2, int eql) #if 0 if (!(rb_equal(RHASH_IFNONE(hash1), RHASH_IFNONE(hash2)) && - FL_TEST(hash1, RHASH_PROC_DEFAULT) == FL_TEST(hash2, RHASH_PROC_DEFAULT))) + FL_TEST(hash1, RHASH_PROC_DEFAULT) == FL_TEST(hash2, RHASH_PROC_DEFAULT))) return Qfalse; #endif return Qtrue; diff --git a/marshal.c b/marshal.c index db62d3bda2..61c7c13a22 100644 --- a/marshal.c +++ b/marshal.c @@ -917,7 +917,7 @@ w_object(VALUE obj, struct dump_arg *arg, int limit) if (NIL_P(RHASH_IFNONE(obj))) { w_byte(TYPE_HASH, arg); } - else if (FL_TEST(obj, RHASH_PROC_DEFAULT)) { + else if (FL_TEST(obj, RHASH_PROC_DEFAULT)) { rb_raise(rb_eTypeError, "can't dump hash with default proc"); } else {