ruby-changes:2707
From: ko1@a...
Date: 12 Dec 2007 12:46:23 +0900
Subject: [ruby-changes:2707] matz - Ruby:r14198 (trunk): * parse.y (expr): 'not' and '!' should act as conditional
matz 2007-12-12 12:45:36 +0900 (Wed, 12 Dec 2007)
New Revision: 14198
Modified files:
trunk/ChangeLog
trunk/parse.y
Log:
* parse.y (expr): 'not' and '!' should act as conditional
expression. [ruby-dev:32548]
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/parse.y?r1=14198&r2=14197
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14198&r2=14197
Index: ChangeLog
===================================================================
--- ChangeLog (revision 14197)
+++ ChangeLog (revision 14198)
@@ -1,3 +1,8 @@
+Wed Dec 12 12:44:39 2007 Yukihiro Matsumoto <matz@r...>
+
+ * parse.y (expr): 'not' and '!' should act as conditional
+ expression. [ruby-dev:32548]
+
Wed Dec 12 12:11:42 2007 Nobuyoshi Nakada <nobu@r...>
* re.c (rb_reg_regsub): should copy encoding.
Index: parse.y
===================================================================
--- parse.y (revision 14197)
+++ parse.y (revision 14198)
@@ -1148,7 +1148,7 @@
| keyword_not expr
{
/*%%%*/
- $$ = call_uni_op($2, '!');
+ $$ = call_uni_op(cond($2), '!');
/*%
$$ = dispatch2(unary, ripper_intern("not"), $2);
%*/
@@ -1156,7 +1156,7 @@
| '!' command_call
{
/*%%%*/
- $$ = call_uni_op($2, '!');
+ $$ = call_uni_op(cond($2), '!');
/*%
$$ = dispatch2(unary, ripper_id2sym('!'), $2);
%*/
@@ -2142,7 +2142,7 @@
| '!' arg
{
/*%%%*/
- $$ = call_uni_op($2, '!');
+ $$ = call_uni_op(cond($2), '!');
/*%
$$ = dispatch2(unary, ID2SYM('!'), $2);
%*/
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml