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

ruby-changes:35487

From: nobu <ko1@a...>
Date: Sat, 13 Sep 2014 10:29:02 +0900 (JST)
Subject: [ruby-changes:35487] nobu:r47569 (trunk): parse.y: intern_cstr

nobu	2014-09-13 10:28:57 +0900 (Sat, 13 Sep 2014)

  New Revision: 47569

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47569

  Log:
    parse.y: intern_cstr
    
    * parse.y (intern_cstr): remove `_without_pindown` suffix and use
      rb_intern3() as well as RIPPER, for the time being.
      [ruby-core:65009] [Bug #10206]

  Modified files:
    trunk/parse.y
Index: parse.y
===================================================================
--- parse.y	(revision 47568)
+++ parse.y	(revision 47569)
@@ -283,16 +283,16 @@ struct parser_params { https://github.com/ruby/ruby/blob/trunk/parse.y#L283
 };
 
 #ifdef RIPPER
-#define intern_cstr_without_pindown(n,l,en) rb_intern3(n,l,en)
+#define intern_cstr(n,l,en) rb_intern3(n,l,en)
 #else
-#define intern_cstr_without_pindown(n,l,en) rb_intern_cstr_without_pindown(n,l,en)
+#define intern_cstr(n,l,en) rb_intern3(n,l,en)
 #endif
 
 #define STR_NEW(p,n) rb_enc_str_new((p),(n),current_enc)
 #define STR_NEW0() rb_enc_str_new(0,0,current_enc)
 #define STR_NEW2(p) rb_enc_str_new((p),strlen(p),current_enc)
 #define STR_NEW3(p,n,e,func) parser_str_new((p),(n),(e),(func),current_enc)
-#define TOK_INTERN() intern_cstr_without_pindown(tok(), toklen(), current_enc)
+#define TOK_INTERN() intern_cstr(tok(), toklen(), current_enc)
 
 static int parser_yyerror(struct parser_params*, const char*);
 #define yyerror(msg) parser_yyerror(parser, (msg))
@@ -7447,7 +7447,7 @@ parse_gvar(struct parser_params *parser, https://github.com/ruby/ruby/blob/trunk/parse.y#L7447
 	    return '$';
 	}
       gvar:
-	set_yylval_name(intern_cstr_without_pindown(tok(), tokidx, current_enc));
+	set_yylval_name(intern_cstr(tok(), tokidx, current_enc));
 	return tGVAR;
 
       case '&':		/* $&: last match */
@@ -9941,7 +9941,7 @@ reg_named_capture_assign_iter(const Onig https://github.com/ruby/ruby/blob/trunk/parse.y#L9941
 	!rb_enc_symname2_p(s, len, enc)) {
         return ST_CONTINUE;
     }
-    var = intern_cstr_without_pindown(s, len, enc);
+    var = intern_cstr(s, len, enc);
     if (dvar_defined(var) || local_id(var)) {
         rb_warningV("named capture conflicts a local variable - %"PRIsVALUE,
                     rb_id2str(var));

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

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