* 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:
parent
ad72efa269
commit
91142c95bb
@ -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.
|
||||
|
6
parse.y
6
parse.y
@ -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);
|
||||
%*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user