ruby-changes:39824
From: nobu <ko1@a...>
Date: Sun, 20 Sep 2015 08:05:17 +0900 (JST)
Subject: [ruby-changes:39824] nobu:r51905 (trunk): parse.y: simplify ripper_id2sym
nobu 2015-09-20 08:04:48 +0900 (Sun, 20 Sep 2015) New Revision: 51905 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51905 Log: parse.y: simplify ripper_id2sym * parse.y (ripper_id2sym): remove unnecessary comparison as rb_ispunct has stricter condition, and cast explicitly to suppress warnings. Modified files: trunk/parse.y Index: parse.y =================================================================== --- parse.y (revision 51904) +++ parse.y (revision 51905) @@ -612,7 +612,7 @@ static void ripper_error_gen(struct pars https://github.com/ruby/ruby/blob/trunk/parse.y#L612 #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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/