From 02f5e627a49c28beb421c869e4e1d4525d59d8ac Mon Sep 17 00:00:00 2001 From: yui-knk Date: Sat, 6 Apr 2024 19:05:53 +0900 Subject: [PATCH] Remove redundant conversion between int and object --- parse.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parse.y b/parse.y index d8f3473f93..291f9f5491 100644 --- a/parse.y +++ b/parse.y @@ -1830,7 +1830,7 @@ extern const ID id_warn, id_warning, id_gets, id_assoc; # define WARN_S(s) s # define WARN_I(i) i # define WARN_ID(i) rb_id2name(i) -# define WARN_IVAL(i) NUM2INT(i) +# define WARN_IVAL(i) i # define PRIsWARN PRIsVALUE # define WARN_ARGS(fmt,n) WARN_ARGS_L(p->ruby_sourceline,fmt,n) # define WARN_ARGS_L(l,fmt,n) p->ruby_sourcefile, (l), (fmt) @@ -13462,7 +13462,7 @@ rb_parser_check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE * st_data_t line; if (st_lookup(p->case_labels, (st_data_t)arg, &line)) { rb_warning1("duplicated 'when' clause with line %d is ignored", - WARN_IVAL(INT2NUM((int)line))); + WARN_IVAL((int)line)); return; } }