mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Compare boolean values for parser pragma locale-insensitively
This commit is contained in:
parent
bdcfa70bbd
commit
539b89075a
1 changed files with 2 additions and 2 deletions
4
parse.y
4
parse.y
|
@ -7916,12 +7916,12 @@ parser_get_bool(struct parser_params *p, const char *name, const char *val)
|
||||||
{
|
{
|
||||||
switch (*val) {
|
switch (*val) {
|
||||||
case 't': case 'T':
|
case 't': case 'T':
|
||||||
if (strcasecmp(val, "true") == 0) {
|
if (STRCASECMP(val, "true") == 0) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'f': case 'F':
|
case 'f': case 'F':
|
||||||
if (strcasecmp(val, "false") == 0) {
|
if (STRCASECMP(val, "false") == 0) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue