mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parse.y: simplify ripper_id2sym
* parse.y (ripper_id2sym): remove unnecessary comparison as rb_ispunct has stricter condition, and cast explicitly to suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bffa617d36
commit
6628cd6b37
1 changed files with 1 additions and 1 deletions
2
parse.y
2
parse.y
|
@ -612,7 +612,7 @@ static void ripper_error_gen(struct parser_params *parser);
|
|||
#define ripper_intern(s) ID2SYM(rb_intern(s))
|
||||
static VALUE ripper_id2sym(ID);
|
||||
#ifdef __GNUC__
|
||||
#define ripper_id2sym(id) ((id) < 256 && rb_ispunct(id) ? \
|
||||
#define ripper_id2sym(id) (rb_ispunct((int)(id)) ? \
|
||||
ID2SYM(id) : ripper_id2sym(id))
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue