From: nobuyoshi nakada Date: 2005-06-09T13:32:21+09:00 Subject: Re: making a duck Hi, At Thu, 9 Jun 2005 01:30:53 +0900, Eric Mahurin wrote in [ruby-talk:144892]: > # make == look like === > digit = (?0..?9).duck(:==,:===) > # match to a string of 4 digits > # Proc responds to [] like a String/Array > cursor.scan(proc{|i|(i<4)? digit : nil}) It would be called as `alias', I guess. -- Nobu Nakada