e$B$3$s$K$A$O!"$J$+$`$ie(B(e$B$&e(B)e$B$G$9!#e(B
In message “[ruby-cvs:24798] Ruby:r17573 (trunk): * parse.y (primary):
make functional-style not operator to act”
on Jun.25,2008 21:55:48, [email protected] wrote:
matz 2008-06-25 21:55:47 +0900 (Wed, 25 Jun 2008)
New Revision: 17573
(snip)
Log:
* parse.y (primary): make functional-style not operator to act
like function. see http://d.hatena.ne.jp/ku-ma-me/20080624/p1.
e$B1sF#$5$s$K65$($F$b$i$C$?$N$G$9$,!"$3$NJQ99$Ge(B
not()
e$B$,%Q!<%9%(%i!<$K$J$k$h$&$K$J$C$F$$$^$9e(B(e$B=>Mh$Oe(Btruee$B$rJV$9e(B)e$B!#e(B
e$B=$@5$7$F$_$^$7$?!#e(B
Index: parse.y
— parse.y (revision 17573)
+++ parse.y (working copy)
@@ -2621,6 +2621,14 @@ primary : literal
$$ = dispatch2(unary, ripper_intern(“not”), $3);
%*/
}
- | keyword_not ‘(’ rparen
-
{
-
/*%%%*/
-
$$ = call_uni_op(cond(NEW_NIL()), '!');
-
/*%
-
$$ = dispatch2(unary, ripper_intern("not"), Qnil);
-
%*/
-
}
| operation brace_block
{
/%%%/
e$B$=$l$G$O!#e(B
e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B
In message “Re: [ruby-dev:35227] [Bug:trunk] Re: [ruby-cvs:24798]
Ruby:r17573 (trunk): * parse.y (primary): make functional-style not
operator to act”
on Wed, 25 Jun 2008 22:33:26 +0900, “U.Nakamura”
[email protected] writes:
|e$B1sF#$5$s$K65$($F$b$i$C$?$N$G$9$,!"$3$NJQ99$Ge(B
| not()
|e$B$,%Q!<%9%(%i!<$K$J$k$h$&$K$J$C$F$$$^$9e(B(e$B=>Mh$Oe(Btruee$B$rJV$9e(B)e$B!#e(B
e$B$$$C!#5$$,$D$+$J$+$C$?!#e(B
|e$B=$@5$7$F$_$^$7$?!#e(B
e$B$C$F$$$&$+!"=c?h$Ke(Bliteral truee$B$G$$$$$s$8$c$J$$$G$9$+$M!#e(B
e$B$3$s$K$A$O!"$J$+$`$ie(B(e$B$&e(B)e$B$G$9!#e(B
In message “[ruby-dev:35231] Re: [Bug:trunk] Re: [ruby-cvs:24798]
Ruby:r17573 (trunk): * parse.y (primary): make functional-style not
operator to act”
on Jun.26,2008 00:41:43, [email protected] wrote:
|e$B=$@5$7$F$_$^$7$?!#e(B
e$B$C$F$$$&$+!"=c?h$Ke(Bliteral truee$B$G$$$$$s$8$c$J$$$G$9$+$M!#e(B
e$B@N$J$i$=$l$G$b$h$+$C$?$s$G$7$g$&$1$I!":#$de(B!e$B$O:FDj5A$G$-$k$N$G!"e(B
e$B;d$N%Q%C%A$H:#$Ne(Btrunke$B$@$H!"e(B
% ruby-mypatch -e ‘def nil.!; false; end; p not()’
false
% ruby-trunk -e ‘def nil.!; false; end; p not()’
true
e$B$H$$$&0c$$$,H/@8$7$^$9!#e(B
e$B$=$l$G$O!#e(B
e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B
In message “Re: [ruby-dev:35237] Re: [Bug:trunk] Re: [ruby-cvs:24798]
Ruby:r17573 (trunk): * parse.y (primary): make functional-style not
operator to act”
on Thu, 26 Jun 2008 09:12:32 +0900, “U.Nakamura”
[email protected] writes:
|> e$B$C$F$$$&$+!“=c?h$Ke(Bliteral truee$B$G$$$$$s$8$c$J$$$G$9$+$M!#e(B
|
|e$B@N$J$i$=$l$G$b$h$+$C$?$s$G$7$g$&$1$I!”:#$de(B!e$B$O:FDj5A$G$-$k$N$G!"e(B
|e$B;d$N%Q%C%A$H:#$Ne(Btrunke$B$@$H!"e(B
|
| % ruby-mypatch -e ‘def nil.!; false; end; p not()’
| false
| % ruby-trunk -e ‘def nil.!; false; end; p not()’
| true
|
|e$B$H$$$&0c$$$,H/@8$7$^$9!#e(B
e$B$=$l$O$=$&$G$9$,!"e(Bnot()e$B$,e(Bnot(nil)e$B$HEy$7$$$H$$$&$3$H$O<+L@$G$Oe(B
e$B$J$$$N$G!"e(Btruee$B$J$ie(Btruee$B$G9=$o$J$$$N$G$O$J$$$+$H;W$C$F$7$^$$$^e(B
e$B$9!#e(B
e$B$3$s$K$A$O!"$J$+$`$ie(B(e$B$&e(B)e$B$G$9!#e(B
In message “[ruby-dev:35245] Re: [Bug:trunk] Re: [ruby-cvs:24798]
Ruby:r17573 (trunk): * parse.y (primary): make functional-style not
operator to act”
on Jun.26,2008 16:02:09, [email protected] wrote:
|e$B$H$$$&0c$$$,H/@8$7$^$9!#e(B
e$B$=$l$O$=$&$G$9$,!"e(Bnot()e$B$,e(Bnot(nil)e$B$HEy$7$$$H$$$&$3$H$O<+L@$G$Oe(B
e$B$J$$$N$G!"e(Btruee$B$J$ie(Btruee$B$G9=$o$J$$$N$G$O$J$$$+$H;W$C$F$7$^$$$^e(B
e$B$9!#e(B
e$B$(!"<+L@$8$c$J$$$s$G$9$+e(B?
()e$B$Oe(Bnile$B$K$J$j$^$9$+$i!"e(Bnot()e$B$,e(B(not
nil)e$B$HEy$7$$$N$OEvA3$J5$$,e(B
e$B$9$k$N$G$9$,e(B…
e$B$I$C$A$+$H$$$&$He(B()e$B$,e(Bnile$B$K$J$k$N$,;d$K$O<+L@$8$c$J$+$C$?$s$G$9e(B
e$B$,!"e(B0.95e$B$+$i$=$&$@$C$?$i$7$$$N$G$=$l$O$=$&$$$&$b$s$+$J$H;W$Ce(B
e$B$F$$$^$9!#e(B
e$B$=$l$G$O!#e(B
e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B
In message “Re: [ruby-dev:35246] Re: [Bug:trunk] Re: [ruby-cvs:24798]
Ruby:r17573 (trunk): * parse.y (primary): make functional-style not
operator to act”
on Thu, 26 Jun 2008 16:17:15 +0900, “U.Nakamura”
[email protected] writes:
|> e$B$=$l$O$=$&$G$9$,!"e(Bnot()e$B$,e(Bnot(nil)e$B$HEy$7$$$H$$$&$3$H$O<+L@$G$Oe(B
|> e$B$J$$$N$G!“e(Btruee$B$J$ie(Btruee$B$G9=$o$J$$$N$G$O$J$$$+$H;W$C$F$7$^$$$^e(B
|> e$B$9!#e(B
|
|e$B$(!”<+L@$8$c$J$$$s$G$9$+e(B?
|()e$B$Oe(Bnile$B$K$J$j$^$9$+$i!"e(Bnot()e$B$,e(B(not nil)e$B$HEy$7$$$N$OEvA3$J5$$,e(B
|e$B$9$k$N$G$9$,e(B…
e$B$&!<$s!"$=$l$O$=$l$G6Z$,DL$C$F$$$k$N$G$=$N$h$&$K$9$k$3$H$K$7e(B
e$B$^$9!#e(B
|e$B$I$C$A$+$H$$$&$He(B()e$B$,e(Bnile$B$K$J$k$N$,;d$K$O<+L@$8$c$J$+$C$?$s$G$9e(B
|e$B$,!"e(B0.95e$B$+$i$=$&$@$C$?$i$7$$$N$G$=$l$O$=$&$$$&$b$s$+$J$H;W$Ce(B
|e$B$F$$$^$9!#e(B
e$B$3$NJU$Oe(BLispe$B$N1F6A$G$9$M!#$h$7$"$7$G$9$,!#e(B
e$B%A%1%C%He(B #201 e$B$,99?7$5$l$^$7$?!#e(B (by Yukihiro M.)
e$B%9%F!<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B
Applied in changeset r17574.
http://redmine.ruby-lang.org/issues/show/201