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:
parent
2c8fd3fce8
commit
da4d4c0024
1 changed files with 1 additions and 1 deletions
2
parse.y
2
parse.y
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue