From: "Brian Schröder" Date: 2004-12-02T22:16:38+09:00 Subject: Re: singleton methods : when are they not permitted? On Thu, 2 Dec 2004 21:27:43 +0900 "Robert Klemme" wrote: > [snip] > But > > >> 2.times do |i| puts /abc#{i}/o.id end > 135012888 > 135012888 > => 2 > > Note the usage of flag "o". > > Kind regards > > robert > Interesting, but what is the use case for this? It seems to be quite dangerous because it makes code really difficult to understand. E.g. The causual reader would expect this to yield nil, 0, nil. > 3.times do | i | puts /#{i}/o =~ '1' end nil nil nil => 3 I shall read my pickaxe again ;) Regards, Brian -- Brian Schr�der http://www.brian-schroeder.de/