ruby-changes:24862
From: usa <ko1@a...>
Date: Wed, 5 Sep 2012 19:23:04 +0900 (JST)
Subject: [ruby-changes:24862] usa:r36913 (trunk): * parse.y (rb_warn4S): renamed from rb_warn4(), because the case in
usa 2012-09-05 19:22:49 +0900 (Wed, 05 Sep 2012) New Revision: 36913 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36913 Log: * parse.y (rb_warn4S): renamed from rb_warn4(), because the case in r36911 takes a string. * parse.y (rb_warn4S): use ripper_warnS() for ripper. * parse.y (ripper_warnS): now it is used. Modified files: trunk/ChangeLog trunk/parse.y Index: ChangeLog =================================================================== --- ChangeLog (revision 36912) +++ ChangeLog (revision 36913) @@ -1,6 +1,16 @@ +Wed Sep 5 19:20:53 2012 NAKAMURA Usaku <usa@r...> + + * parse.y (rb_warn4S): renamed from rb_warn4(), because the case in + r36911 takes a string. + + * parse.y (rb_warn4S): use ripper_warnS() for ripper. + + * parse.y (ripper_warnS): now it is used. + Wed Sep 5 15:51:52 2012 URABE Shyouhei <shyouhei@r...> - * .travis.yml (notifications): [experimental] update notification template. + * .travis.yml (notifications): [experimental] update notification + template. Wed Sep 5 15:21:12 2012 NARUSE, Yui <naruse@r...> Index: parse.y =================================================================== --- parse.y (revision 36912) +++ parse.y (revision 36913) @@ -596,21 +596,19 @@ # define rb_warn0(fmt) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt)) # define rb_warnI(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a)) # define rb_warnS(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a)) -# define rb_warn4(file,line,fmt,a) rb_compile_warn((file), (line), (fmt), (a)) +# define rb_warn4S(file,line,fmt,a) rb_compile_warn((file), (line), (fmt), (a)) # define rb_warning0(fmt) rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt)) # define rb_warningS(fmt,a) rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt), (a)) #else # define rb_warn0(fmt) ripper_warn0(parser, (fmt)) # define rb_warnI(fmt,a) ripper_warnI(parser, (fmt), (a)) # define rb_warnS(fmt,a) ripper_warnS(parser, (fmt), (a)) -# define rb_warn4(file,line,fmt,a) ripper_warnI(parser, (fmt), (a)) +# define rb_warn4S(file,line,fmt,a) ripper_warnS(parser, (fmt), (a)) # define rb_warning0(fmt) ripper_warning0(parser, (fmt)) # define rb_warningS(fmt,a) ripper_warningS(parser, (fmt), (a)) static void ripper_warn0(struct parser_params*, const char*); static void ripper_warnI(struct parser_params*, const char*, int); -#if 0 static void ripper_warnS(struct parser_params*, const char*, const char*); -#endif static void ripper_warning0(struct parser_params*, const char*); static void ripper_warningS(struct parser_params*, const char*, const char*); #endif @@ -9448,7 +9446,7 @@ for (i = 0; i < cnt; ++i) { if (!v[i] || (u[i] & LVAR_USED)) continue; if (is_private_local_id(v[i])) continue; - rb_warn4(ruby_sourcefile, (int)u[i], "assigned but unused variable - %s", rb_id2name(v[i])); + rb_warn4S(ruby_sourcefile, (int)u[i], "assigned but unused variable - %s", rb_id2name(v[i])); } } @@ -11151,14 +11149,12 @@ STR_NEW2(fmt), INT2NUM(a)); } -#if 0 static void ripper_warnS(struct parser_params *parser, const char *fmt, const char *str) { rb_funcall(parser->value, rb_intern("warn"), 2, STR_NEW2(fmt), STR_NEW2(str)); } -#endif static void ripper_warning0(struct parser_params *parser, const char *fmt) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/