--8323328-1508713331-1144548038624
Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-1508713331-1144548038=:6624"

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--8323328-1508713331-1144548038624
Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE

Hi --

On Sun, 9 Apr 2006, Florian Gro¥ß_ wrote:

> Gokhan Ersumer wrote:
>
>> I'm experimenting with Ruby by writing some kind of DSL.
>> I wonder if It is possible calling given block to a proc with different 
>> binding
>
> I think you are looking for Object#instance_eval.
>
> Note that in 1.8 there is no way to build-in way to execute a block in a 
> different context and at the same time providing it with arguments.
>
> In 1.9 it will be possible to do that with Object#instance_exec.

Do you know why there are going to be two methods, instead of just
adding argument capabilites to instance_eval?  I'm also not sure how
'eval' vs. 'exec' expresses arguments vs. no arguments.  Do you know
the reasoning behind it?


David

-- 
David A. Black (dblack / wobblini.net)
Ruby Power and Light, LLC (http://www.rubypowerandlight.com)

"Ruby for Rails" coming in PDF April 15, and in paper May 1!
http://www.manning.com/black
--8323328-1508713331-1144548038624--
--8323328-1508713331-1144548038624--