Author: lwall
Date: 2010-08-16 19:54:52 +0200 (Mon, 16 Aug 2010)
New Revision: 32014
Modified:
docs/Perl6/Spec/S02-bits.pod
docs/Perl6/Spec/S03-operators.pod
Log:
[S02,S03] allow Nil to smartmatch a Nil
Modified: docs/Perl6/Spec/S02-bits.pod
===================================================================
--- docs/Perl6/Spec/S02-bits.pod 2010-08-16 17:49:53 UTC (rev 32013)
+++ docs/Perl6/Spec/S02-bits.pod 2010-08-16 17:54:52 UTC (rev 32014)
@@ -2164,7 +2164,7 @@
Since method calls are performed directly on any object, C<Nil>
can respond to certain method calls. C<Nil.defined> returns
C<False> (whereas C<().defined> returns C<True>). C<Nil.so> also
-returns C<False>. C<Nil.ACCEPTS> is always false. C<Nil.perl> and
+returns C<False>. C<Nil.ACCEPTS> matches only a C<Nil> value. C<Nil.perl> and
C<Nil.Str> return C<"Nil">. C<Nil.Stringy> returns '' with a warning.
C<Nil.Numeric> returns 0 with a warning. Any undefined method call
on C<Nil> returns C<Nil>, so that C<Nil> propagates down method
Modified: docs/Perl6/Spec/S03-operators.pod
===================================================================
--- docs/Perl6/Spec/S03-operators.pod 2010-08-16 17:49:53 UTC (rev 32013)
+++ docs/Perl6/Spec/S03-operators.pod 2010-08-16 17:54:52 UTC (rev 32014)
@@ -15,8 +15,8 @@
Created: 8 Mar 2004
- Last Modified: 26 Jun 2010
- Version: 212
+ Last Modified: 16 Aug 2010
+ Version: 213
=head1 Overview
@@ -3512,6 +3512,7 @@
Any Numeric numeric equality +$_ == X
Any Stringy string equality ~$_ eq X
Any Whatever always matches True
+ Any Nil is nil $_ === Nil
Hash Pair test hash mapping $_{X.key} ~~ X.value
Any Pair test object attribute ?."{X.key}" === ?X.value (e.g.
filetests)