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
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;
|
enum lex_state_e state = lex_state;
|
||||||
lex_state = kw->state;
|
lex_state = kw->state;
|
||||||
if (IS_lex_state_for(state, EXPR_FNAME)) {
|
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];
|
return kw->id[0];
|
||||||
}
|
}
|
||||||
if (IS_lex_state(EXPR_BEG)) {
|
if (IS_lex_state(EXPR_BEG)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user