In message "[ruby-talk:01196] Re: Semantics of chomp/chop"
on 00/01/29, ts <decoux / moulon.inra.fr> writes:
| About $&, I've in ruby-man-1.4 :
|
| $&
|
| The string matched by the last successful pattern match in this
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| scope. (Mnemonic: like & in some editors.) This variable is
| read-only.
|
| but if I try :
|pigeon% ruby -e '"abcd".gsub!("a", "e"); p $&'
|nil
|pigeon%
| This is not really the last _successful_ pattern match, no ?
No. It should be `the last pattern match attempt'.
matz.