I expose a custom object derived from DynamicObject to IronPython and IronRuby scripts.
During testing I found some curious behavior:
1) When I want to access a dynamic property of my custom object and I use IronRuby, the name of the property is always capitalized and underscores are removed. e.g.: puts myObject.foo_bar => TryGetMember("FooBar"). This only happens with IronRuby
and when accessing a member, when setting a member the name is not modified.
2) TryConvert never gets called on my dynamic object. For example if I assign my dynamic object to an int property of another object, the runtime reports an error "Cannot convert xxx to yyy". If I add an implicit cast operator to int to my
dynamic object class, the runs through without errors. I've tested this with IronPython and IronRuby.
I'm using DLR V1.0 for .Net 2.0