1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

parse.y: call rb_intern2

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-07-22 00:36:09 +00:00
parent 2c8fd3fce8
commit da4d4c0024

View file

@ -7813,7 +7813,7 @@ parse_ident(struct parser_params *parser, int c, int cmd_state)
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)) {