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

ruby-changes:41712

From: nobu <ko1@a...>
Date: Tue, 9 Feb 2016 14:47:03 +0900 (JST)
Subject: [ruby-changes:41712] nobu:r53786 (trunk): rename ADD_FEATURE

nobu	2016-02-09 14:47:12 +0900 (Tue, 09 Feb 2016)

  New Revision: 53786

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53786

  Log:
    rename ADD_FEATURE
    
    * ruby.c (ADD_FEATURE_NAME): rename ADD_FEATURE, as it does not
      add a feature, but just append a name to the message string.

  Modified files:
    trunk/ruby.c
Index: ruby.c
===================================================================
--- ruby.c	(revision 53785)
+++ ruby.c	(revision 53786)
@@ -776,14 +776,15 @@ feature_option(const char *str, int len, https://github.com/ruby/ruby/blob/trunk/ruby.c#L776
     if (matched == 1) goto found;
     if (matched > 1) {
 	VALUE mesg = rb_sprintf("ambiguous feature: `%.*s' (", len, str);
-#define ADD_FEATURE(bit) \
+#define ADD_FEATURE_NAME(bit) \
 	if (FEATURE_BIT(bit) & set) { \
 	    rb_str_cat_cstr(mesg, #bit); \
 	    if (--matched) rb_str_cat_cstr(mesg, ", "); \
 	}
-	EACH_FEATURES(ADD_FEATURE);
+	EACH_FEATURES(ADD_FEATURE_NAME);
 	rb_str_cat_cstr(mesg, ")");
 	rb_exc_raise(rb_exc_new_str(rb_eRuntimeError, mesg));
+#undef ADD_FEATURE_NAME
     }
 #endif
     rb_warn("unknown argument for --%s: `%.*s'",

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

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