Heads up, looks like this applies to the Expando object as well, here's
an even simpler gist:
https://gist.github.com/1205646
--
Posted via http://www.ruby-forum.com/.
___
Ironruby-core mailing list
Ironruby-core@rubyforge.org
I am working with IronRuby and a DynamicObject derived class to create a
proxy layer for a game scripting engine that allows me to intercept gets
and sets and do things like mark objects for saving, potentially
security checks, etc.
But I'm finding that if my TryGetMember returns true, but sets
Try implementing TryInvokeMember.
In IronRuby d.foo actually gets and invokes foo, so it will use
DynamicObject's TryInvokeMember. This is different from IronPython and C# where
method calls are two operations: TryGetMember (d.Foo) and TryInvoke (d.Foo()).
The rough IronRuby equivalent to this
Okay, very interesting stuff. I had seen you and others suggest that in
other places, but I thought I was insulated from it, because I *was*
implementing TryInvokeMember! After further examination, I seem to have
stumbled to a solution.
In my actual code, I was trying to return a function