From: David Masover Date: 2008-07-27T12:18:04+09:00 Subject: Re: Is there a better way to do this wxPython example in Ruby? On Saturday 26 July 2008 22:14:01 Wayne Magor wrote: > build_one_button(panel, "LAST", [240, 0], &lambda {|e| > on_last(e)}) > def build_one_button(parent, label, pos=[0,0], &handler) Looks like, at the very least, you could do: build_one_button(panel, "LAST", [240,0]) {|e| on_last(e)} I think your function is already set up to accept a block, so it's the same syntax as each(), which you're probably already familiar with: (1..99).each {|i| puts "#{i} bottles of beer on the wall..."}