原です。
In message "[ruby-list:14440] Re: sort"
on 99/05/23, GOTO Kentaro <gotoken / math.sci.hokudai.ac.jp> writes:
|
|ごとけんです
|class Object
| def bifurcate
| yield self if iterator?
| self
| end
|end
|
|p ["foo", "bar"].
| bifurcate{|x| p x.collect{|e| e.capitalize}}.
| sort
ああ、なるほど。そういえば同じようなものを作った覚えがあります。