From: Austin Ziegler Date: 2004-09-26T11:52:06+09:00 Subject: Re: Proc / def / yield semantics (long) Actually, Markus, your examples don't work in 1.8.2 at all -- neither the tickl() method or the tickler proc. These do: def tickle(head, *rest) head.giggle if head.respond_to? :giggle tickle(*rest) unless rest.empty? end tickler = Proc.new { |head, *rest| head.giggle if head.respond_to? :giggle tickler.call(*rest) unless rest.empty? } class Giggler def initialize(pos) @pos = pos end def giggle puts "#{@pos}: giggle" end end a = [] 10.times do |pos| if (rand < 0.501) a << Giggler.new(pos) else a << Object.new end end p a tickle(*a) tickler[*a] I don't claim to understand the difference, really -- with the exception of the yield capability in Hash#each, I don't tend to rely on auto-expansion, instead being explicit. -austin