[前][次][番号順一覧][スレッド一覧]

ruby-changes:32279

From: nobu <ko1@a...>
Date: Mon, 23 Dec 2013 15:53:24 +0900 (JST)
Subject: [ruby-changes:32279] nobu:r44358 (trunk): hash.c: reword

nobu	2013-12-23 15:53:17 +0900 (Mon, 23 Dec 2013)

  New Revision: 44358

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44358

  Log:
    hash.c: reword
    
    * hash.c (HAS_EXTRA_STATES, rb_hash_reject): use words
      "extra states".

  Modified files:
    trunk/hash.c
Index: hash.c
===================================================================
--- hash.c	(revision 44357)
+++ hash.c	(revision 44358)
@@ -27,12 +27,12 @@ https://github.com/ruby/ruby/blob/trunk/hash.c#L27
 # 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) https://github.com/ruby/ruby/blob/trunk/hash.c#L1133
     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) https://github.com/ruby/ruby/blob/trunk/hash.c#L1153
 	    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
 	}
     }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]