mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
b3c60b27e7
commit
8ee2226068
2 changed files with 14 additions and 8 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,6 +1,16 @@
|
|||
Wed Sep 5 19:20:53 2012 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* 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@ruby-lang.org>
|
||||
|
||||
* .travis.yml (notifications): [experimental] update notification template.
|
||||
* .travis.yml (notifications): [experimental] update notification
|
||||
template.
|
||||
|
||||
Wed Sep 5 15:21:12 2012 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
|
|
10
parse.y
10
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)
|
||||
|
|
Loading…
Reference in a new issue