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.
- When neither is specified (default), capture of the group of
- /g is specified. The group of the name doesn’t do capture.
- /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
LINE but it’s a method not syntax.
[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
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
– APURI Furuhashi
ruby-dev summary index: http://i.loveruby.net/en/ruby-dev-summary.html