From: nobu.nokada@... Date: 2002-06-06T11:56:56+09:00 Subject: Re: Pascal-like 'with' statement? Hi, At Thu, 6 Jun 2002 09:23:15 +0900, Philip Mak wrote: > Is there something like Pascal's with statement? I'd like to turn this > code: IMO, `with' statement is a misdesign of Pascal. # just a useless joke. module Kernel def as(me) yield(me) end def self; self end end Cfg = OpenStruct.new.as {|my| my.host = 'localhost' my.user = 'shoujoai' my.database = 'shoujoai' my.self } -- Nobu Nakada