From: ara.t.howard@... Date: 2006-04-01T23:54:36+09:00 Subject: Re: ruby-dev summary 28274-28600 On Sat, 1 Apr 2006, APURI Furuhashi wrote: > Hi all, > > This is a summary of ruby-dev ML in these days. > > [ruby-dev:28246] Named Capture for Regexp > > K. Kosako proposed a new /g and /G flag for regexp, > to refer to the result of named capture by the name to Ruby 1.9 > Meaning is as follows. > 1. When neither is specified (default), capture of the group of > the name. > 2. /g is specified. The group of the name doesn't do capture. > 3. /G is specified. The group of the name does capture. > The discussion keeps going. > > > > > [ruby-dev:28481] __method__ for current method > > Usa Nakamura suggested a new method __method__ to access name of > currently executing method. The name is chosen to go with __FILE__ and > __LINE__ but it's a method not syntax. why not be consistent harp:~ > cat a.c #include #include main () { printf ("%s:%s:%d\n", __FILE__, __FUNCTION__, __LINE__); } harp:~ > gcc a.c && a.out a.c:main:3 > [ruby-dev:28533] Multi Methods > > URABE Shyouhei proposed a rough idea for multi methods (in lisp as > generic function) for ruby > The syntax is > def foo( SPEC val) > SPEC is any object which respond to "===". > This allow multiple dispatch class based or like eql? specializer in > lisp. > > But if ther is not a matching SPEC beetween all methods it is still > called, for duck typing. > Matz said he agrees and this can be committed to 1.9 if it is > fast implementation. can any one show an example of what this might look like in ruby? regards. -a -- share your knowledge. it's a way to achieve immortality. - h.h. the 14th dali lama