From: Florian Gross Date: 2003-10-05T01:41:25+09:00 Subject: Re: [ANN] Ruby/Extensions 0.2.0 Gavin Sinclair wrote: > Hi -talk, Moin! > I have released Ruby (Standard Class) Extensions version 0.2.0. Could you include this in the next release? :) class Symbol def to_proc proc { |obj, *args| obj.send(self, *args) } end end It allows you do the following: (1..10).inject(&:*) # => 3628800 %w{foo bar qux}.map(&:reverse) # => %w{oof rab xuq} [1, 2, nil, 3, nil].reject(&:nil?) # => [1, 2, 3] %w{ruby and world}.sort_by(&:reverse) # => %w{world and ruby} > Cheers, > Gavin Regards, Florian Gross