Skip to content

Commit

Permalink
Warn it only with -W:deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
k0kubun committed Dec 7, 2023
1 parent 3bf1c48 commit 5458252
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion parse.y
Expand Up @@ -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:
Expand Down

0 comments on commit 5458252

Please sign in to comment.