summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-23 06:53:17 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-23 06:53:17 +0000
commit21e74f54816b147c0515d0f6c019d3e87fb237d2 (patch)
treed62bd5672fe69695bddc1edd92673b672e969a5e /hash.c
parent16863d903bcf550a99cf19646e7d056b68408c47 (diff)
hash.c: reword
* hash.c (HAS_EXTRA_STATES, rb_hash_reject): use words "extra states". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/hash.c b/hash.c
index 1fa40b1..4442f78 100644
--- a/hash.c
+++ b/hash.c
@@ -27,12 +27,12 @@
# endif
#endif
-#define HAS_MISC_ATTRIBUTES(hash, klass) ( \
+#define HAS_EXTRA_STATES(hash, klass) ( \
(klass = rb_obj_class(hash)) != rb_cHash || \
(klass = 0, \
- FL_TEST((hash), FL_EXIVAR|FL_TAINT|HASH_PROC_DEFAULT) || \
+ FL_TEST((hash), FL_EXIVAR|FL_TAINT|HASH_PROC_DEFAULT) || \
!NIL_P(RHASH_IFNONE(hash))))
-#define HASH_REJECT_COPY_MISC_ATTRIBUTES 1
+#define HASH_REJECT_COPY_EXTRA_STATES 1
static VALUE rb_hash_s_try_convert(VALUE, VALUE);
@@ -1133,11 +1133,11 @@ rb_hash_reject(VALUE hash)
RETURN_SIZED_ENUMERATOR(hash, 0, 0, hash_enum_size);
if (RTEST(ruby_verbose)) {
VALUE klass;
- if (HAS_MISC_ATTRIBUTES(hash, klass)) {
-#if HASH_REJECT_COPY_MISC_ATTRIBUTES
- rb_warn("copying unguaranteed attributes: %+"PRIsVALUE, hash);
- rb_warn("following atributes will not be copied in the future version:");
- if (klass != rb_cHash) {
+ if (HAS_EXTRA_STATES(hash, klass)) {
+#if HASH_REJECT_COPY_EXTRA_STATES
+ rb_warn("copying extra states: %+"PRIsVALUE, hash);
+ rb_warn("following states will not be copied in the future version:");
+ if (klass) {
rb_warn(" subclass: %+"PRIsVALUE, klass);
}
if (FL_TEST(hash, FL_EXIVAR)) {
@@ -1153,8 +1153,7 @@ rb_hash_reject(VALUE hash)
else if (!NIL_P(RHASH_IFNONE(hash)))
rb_warn(" default value: %+"PRIsVALUE, RHASH_IFNONE(hash));
#else
- rb_warn("unguaranteed attributes are not copied: %+"PRIsVALUE, hash);
- rb_warn("following atributes are ignored now:");
+ rb_warn("extra states are no longer copied: %+"PRIsVALUE, hash);
#endif
}
}