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

ruby-changes:39251

From: nobu <ko1@a...>
Date: Wed, 22 Jul 2015 09:36:14 +0900 (JST)
Subject: [ruby-changes:39251] nobu:r51332 (trunk): parse.y: call rb_intern2

nobu	2015-07-22 09:36:09 +0900 (Wed, 22 Jul 2015)

  New Revision: 51332

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

  Log:
    parse.y: call rb_intern2
    
    * parse.y (parse_ident): call rb_intern2 with the known length
      instead of strlen().

  Modified files:
    trunk/parse.y
Index: parse.y
===================================================================
--- parse.y	(revision 51331)
+++ parse.y	(revision 51332)
@@ -7813,7 +7813,7 @@ parse_ident(struct parser_params *parser https://github.com/ruby/ruby/blob/trunk/parse.y#L7813
 	    enum lex_state_e state = lex_state;
 	    lex_state = kw->state;
 	    if (IS_lex_state_for(state, EXPR_FNAME)) {
-		set_yylval_name(rb_intern(kw->name));
+		set_yylval_name(rb_intern2(tok(), toklen()));
 		return kw->id[0];
 	    }
 	    if (IS_lex_state(EXPR_BEG)) {

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

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