* parse.y (expr): 'not' and '!' should act as conditional

expression.   [ruby-dev:32548]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2007-12-12 03:45:36 +00:00
Родитель ad72efa269
Коммит 91142c95bb
2 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Wed Dec 12 12:44:39 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* parse.y (expr): 'not' and '!' should act as conditional
expression. [ruby-dev:32548]
Wed Dec 12 12:11:42 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* re.c (rb_reg_regsub): should copy encoding.

Просмотреть файл

@ -1148,7 +1148,7 @@ expr : command_call
| keyword_not expr
{
/*%%%*/
$$ = call_uni_op($2, '!');
$$ = call_uni_op(cond($2), '!');
/*%
$$ = dispatch2(unary, ripper_intern("not"), $2);
%*/
@ -1156,7 +1156,7 @@ expr : command_call
| '!' command_call
{
/*%%%*/
$$ = call_uni_op($2, '!');
$$ = call_uni_op(cond($2), '!');
/*%
$$ = dispatch2(unary, ripper_id2sym('!'), $2);
%*/
@ -2142,7 +2142,7 @@ arg : lhs '=' arg
| '!' arg
{
/*%%%*/
$$ = call_uni_op($2, '!');
$$ = call_uni_op(cond($2), '!');
/*%
$$ = dispatch2(unary, ID2SYM('!'), $2);
%*/