[前][次][番号順一覧][スレッド一覧]

ruby-changes:56748

From: Nobuyoshi <ko1@a...>
Date: Thu, 1 Aug 2019 16:44:07 +0900 (JST)
Subject: [ruby-changes:56748] Nobuyoshi Nakada: d488464106 (master): Use predefined idOr

https://git.ruby-lang.org/ruby.git/commit/?id=d488464106

From d488464106c0a65c892a8785d577ce8011e6e277 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 1 Aug 2019 15:17:52 +0900
Subject: Use predefined idOr


diff --git a/parse.y b/parse.y
index 46c263f..2008fc6 100644
--- a/parse.y
+++ b/parse.y
@@ -866,7 +866,7 @@ static VALUE heredoc_dedent(struct parser_params*,VALUE); https://github.com/ruby/ruby/blob/trunk/parse.y#L866
 # define rb_warning3L(l,fmt,a,b,c)   WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
 # define rb_warning4L(l,fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
 #ifdef RIPPER
-static ID id_warn, id_warning, id_gets, id_assoc, id_or;
+static ID id_warn, id_warning, id_gets, id_assoc;
 # define WARN_S_L(s,l) STR_NEW(s,l)
 # define WARN_S(s) STR_NEW2(s)
 # define WARN_I(i) INT2NUM(i)
@@ -3791,7 +3791,7 @@ p_alt		: p_alt '|' p_expr_basic https://github.com/ruby/ruby/blob/trunk/parse.y#L3791
 		    /*%%%*/
 			$$ = NEW_NODE(NODE_OR, $1, $3, 0, &@$);
 		    /*% %*/
-		    /*% ripper: binary!($1, STATIC_ID2SYM((id_or)), $3) %*/
+		    /*% ripper: binary!($1, STATIC_ID2SYM(idOr), $3) %*/
 		    }
 		| p_expr_basic
 		;
@@ -12893,7 +12893,6 @@ Init_ripper(void) https://github.com/ruby/ruby/blob/trunk/parse.y#L12893
     id_warning = rb_intern_const("warning");
     id_gets = rb_intern_const("gets");
     id_assoc = rb_intern_const("=>");
-    id_or = rb_intern_const("|");
 
     (void)yystpcpy; /* may not used in newer bison */
 
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]