Tomas finally got the big checkin from RubyConf into TFS this week. I’m
pushing out an update to SVN now, and I’ll follow up with another giant
mail that will detail all DLR changes in the last 3 weeks since our last
update.
See attached email (HTML) if you want to see the pretty picture for 3).
Enjoy!
-John
-
Introduces RubyScope - a local runtime scope to be created for
methods, class/module declarations and blocks (though this shelveset
doesn’t create scope for blocks yet). RubyScope holds on various flags
and self object. It’s lexically chained. Added LocalScope to DLR - it’s
an empty for now, will implement local scopes in DLR this or next week.
LocalScope is available on CodeContext. There are also few hacks on
CodeContext that will be gone after LocalScopes will be finished. -
Fixes Ruby method definitions, class variable access, constant access
and method visibility settings - to use lexical lookup via scopes. -
Refactors class structure and method tables to match Ruby semantics.
S(w) means singleton/virtual class of w; x and y are instances of C, y
has a singleton class defined. -
Fixes method lookup: follow one s-arrow and then b-arrows until
Object is reached. -
Unifies methods implementing member enumeration. Implements
reflection methods on Module (e.g. get_const, set_const,
instance_methods, …). -
Implements undef and alias keywords (alias doesn’t work for globals
yet, just for methods). -
Adds support for method removal and undef, including CLR methods
removal (though CLR method removal is not implemented completely). Added
attribute (RemoveMethodAttribute) that enables to remove a CLR method
declaratively in an extension class in library. -
Refactors and fixes CLR method, field and event lookup.
-
Refactors Ruby library attributes: [RubyClass], [RubyModule],
[Includes]. Removed extension attributes as they are not needed any
more. Added Copy flag on IncludesAttribute that will copy members of
included module into the including class instead of adding the module
into the including class’s mixin list. This enables to transparently
hoist RubyArray and RubyHash methods that are implemented on IList and
IDictionary interfaces to these interfaces’ extensions. -
Refactors CLR interface interop. CLR interfaces are treated as empty
Ruby modules. A CLR type that implements an interface includes it in its
mixin list. They can be opened in Ruby code and methods could be added.
Interfaces can be opened also from library code, in fact several
interfaces (IEnumerable, IList, Icollection, IDictionary). -
Refactors ClassInitGenerator, adapts it to the new attributes.