From: shugo@... (Shugo Maeda) Date: 1999-01-30T00:45:20+09:00 Subject: [ruby-dev:4495] Re: keyword argument (Re: Re: cascades on ruby) 前田です。 matz@netlab.co.jp (Yukihiro Matsumoto) writes: > で,確認ですが,ご自分の提案である foo(bar: 25, baz: 44) の > ようなのは許容できると言うことなんですね. これって、 class Interval def initialize(first, last, step) @first, @last, @step = first, last, step end def each @first.step(@last, @step) end end class Integer def to(last, by: step) return Interval.new(self, last, step) end end for i in 0.to: 100, by: 2 p i end みたいなこともできます? # Smalltalkみたいですね。 -- 前田 修吾 (mailto:shugo@netlab.co.jp)