From 8ee2226068bca03aba3dade555ccce3d64e4397a Mon Sep 17 00:00:00 2001 From: usa Date: Wed, 5 Sep 2012 10:22:49 +0000 Subject: [PATCH] * 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 12 +++++++++++- parse.y | 10 +++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 327e98ab3e..1c056ea003 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,16 @@ +Wed Sep 5 19:20:53 2012 NAKAMURA Usaku + + * 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 - * .travis.yml (notifications): [experimental] update notification template. + * .travis.yml (notifications): [experimental] update notification + template. Wed Sep 5 15:21:12 2012 NARUSE, Yui diff --git a/parse.y b/parse.y index 230faa3dc9..fc99d2ffe6 100644 --- a/parse.y +++ b/parse.y @@ -596,21 +596,19 @@ new_args_tail_gen(struct parser_params *parser, VALUE k, VALUE kr, VALUE b) # 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 @@ warn_unused_var(struct parser_params *parser, struct local_vars *local) 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 @@ ripper_warnI(struct parser_params *parser, const char *fmt, int a) 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)