[#1026] Is this a bug? — Dave Thomas <Dave@...>

18 messages 2000/01/03

[#1084] Infinite loop — Dave Thomas <Dave@...>

17 messages 2000/01/11

[#1104] The value of while... — Dave Thomas <Dave@...>

24 messages 2000/01/11

[ruby-talk:01204] Re: Semantics of chomp/chop

From: matz@... (Yukihiro Matsumoto)
Date: 2000-01-31 01:25:32 UTC
List: ruby-talk #1204
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.

In This Thread