@@ -13,8 +13,8 @@ Synopsis 2: Bits and Pieces
13
13
14
14
Created: 10 Aug 2004
15
15
16
- Last Modified: 6 Jul 2011
17
- Version: 235
16
+ Last Modified: 2 Aug 2011
17
+ Version: 236
18
18
19
19
This document summarizes Apocalypse 2, which covers small-scale
20
20
lexical items and typological issues. (These Synopses also contain
@@ -2237,16 +2237,17 @@ C<Nil.Numeric> returns 0 with a warning. Any undefined method call
2237
2237
on C<Nil> returns C<Nil>, so that C<Nil> propagates down method
2238
2238
call chains.
2239
2239
2240
- Assigning C<Nil> to any scalar container causes the
2241
- container to throw out any contents and restore itself to an
2242
- uninitialized state (after which it will contain a type object
2243
- appropriate to the declared type of the container, where C<Any>
2244
- is the default type). Binding of C<Nil> has a similar result, except that binding
2245
- C<Nil> to a parameter with a default causes that parameter to be set to its
2246
- default value rather than an undefined value, as if the argument had not
2247
- been supplied.
2248
-
2249
- Assigning or binding C<Nil> to any composite container (such as an
2240
+ Assigning C<Nil> to any scalar container causes the container to
2241
+ throw out any contents and restore itself to an uninitialized state
2242
+ (after which it will contain a type object appropriate to the declared
2243
+ type of the container, where C<Any> is the default type). Binding of
2244
+ C<Nil> with C<:=> simply puts Nil in the container. However, binding
2245
+ C<Nil> to a parameter (C<::=> semantics) works more like assignment;
2246
+ passing C<Nil> to a parameter with a default causes that parameter
2247
+ to be set to its default value rather than an undefined value, as if
2248
+ the argument had not been supplied.
2249
+
2250
+ Assigning C<Nil> to any composite container (such as an
2250
2251
C<Array> or C<Hash>) empties the container, resetting it back to an
2251
2252
uninitialized state. The container object itself then becomes undefined.
2252
2253
(Asssignment of C<()> leaves it defined.)
0 commit comments