[Nitro] Problem with OpenObject

TRANS transfire at gmail.com
Wed Jun 28 01:47:46 EDT 2006

> o.__self__.instance_eval { ... }

Oops. Actually instance_eval is reserved. So that should work without
the __self__. You must be specifically using #eval (avoid if
possible!). Hmm.... I could do this:

class BasicObject

  # If the method isn't defined try sending it as(Object).

  def method_missing( sym, *args, &blk )
    __as__(Object).__send__( sym, *args, &blk )


But I don't think it's really a good idea b/c if someone does say:

  o = OpenObject.new
  o.eval = "whatever"

Then #eval will not no longer do what you'd expect. Assuming it is in
fact #eval,  I could add a reserved __eval__ alias if that would help.


More information about the Nitro-general mailing list