aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-12-06 23:44:01 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2023-12-06 23:44:02 -0800
commit5458252bb0edcd498e6bd4bea57fd7500bacd54c (patch)
tree6df631e4c38c3ddaf4afa61286301ac2a3c58281 /parse.y
parent3bf1c48759c839dbd897fd119a789166c01b0f18 (diff)
downloadruby-5458252bb0edcd498e6bd4bea57fd7500bacd54c.tar.gz
Warn `it` only with -W:deprecated
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index b35547ad74..5c08dba45a 100644
--- a/parse.y
+++ b/parse.y
@@ -12788,7 +12788,7 @@ gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
if (dyna_in_block(p) && id == rb_intern("it")
&& !(DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev))
&& p->max_numparam != ORDINAL_PARAM) {
- rb_warn0("`it` calls without arguments will refer to the first block param in Ruby 3.4; use it() or self.it");
+ rb_warn_deprecated("calling `it` without arguments in a block", "it() or self.it");
}
return NEW_VCALL(id, loc);
case ID_GLOBAL: