From: Tom Werner Date: 2007-08-18T07:10:54+09:00 Subject: Re: 8086 simulator in ruby Phlip wrote: > Robert Klemme wrote: > > >> CPU8086 do >> label :begin >> push 42 >> shift :b >> jmp :begin >> end >> > > How you get a class name to respond to do? I thought objects couldn't > respond to do, essentially at the syntax level... > > (Or is that pseudo?) > > def FOO yield end FOO do puts 'FOO called' end # => FOO called -- Tom Preston-Werner * Libraries: Chronic (chronic.rubyforge.org) God (god.rubyforge.org) * Site: rubyisawesome.com