On 8/18/07, Phlip <phlip2005 / gmail.com> wrote: > >> Think of do-end as a block that iterates 1 time. That's what it is! > > Please read my posting history, blogs, Ruby open source, etc. (-; > > Robert Klemme wrote: > > > Actually it's not the "10" but the "times" because "CPU8086" would be a > > method. > > > > def CPU8086(&b) > > The point: I thought a method was forbidden as a constant. Easy to write but > hard to call. > > By contrast... > > doc = Hpricot(my_html_string) > > His Whyness did something to the module to make it take a method call > directly... > No modules were hacked or harmed. He just defined a method: 3 def Hpricot(input = nil, opts = {}, &blk) 4 Hpricot.parse(input, opts, &blk) 5 end http://code.whytheluckystiff.net/hpricot/browser/trunk/lib/hpricot/parse.rb -- Chris Carter concentrationstudios.com brynmawrcs.com