NoMethodError: NoMethodError: undefined methodempty' for RcKeyValueDictionary`
NoMethodError: NoMethodError: undefined method
it should read
NoMethodError: NoMethodError: undefined methodempty' for RCHash`
fix rubyFullName for metaclasses
add a more official way of exposing Smalltalk classes to Ruby *after*…
… prim loading
Fixing this isn't possible when using __resolve_smalltalk_global to assign the class name. This is exactly the same as doing:
>> SS = String
=> NoMethodError: undefined method `foo' for String:Class
The name will still be from the original class. __resolve_smalltalk_global wasn't really meant to be used outside bootstrap, either. I have added expose_smalltalk_global_as which takes two Strings, a Smalltalk class name and a Ruby name. It will install the constant under the Ruby name in the current namespace (so you don't have to do the assignment), and it'll setup the Ruby namespace so it prints the desired name for the class.
I've added a test for this behaviour.
@pbm, @monty, if you don't object to this additional method, I'll just merge it. It's new API, anyway, so it wouldn't break existing code.
I think the test should cover both the transient and persistent cases. So we need to test that a transient use of expose_smalltalk_global, followed by a commit does not persist the symbol. And that a persistent use of expose_smalltalk_global, followed by a commit does persist the symbol.
Merge remote-tracking branch 'origin/master' into tim/smalltalk_vs_ru…
expand tests for gh96 to test persistent and transient case and asser…
…t proper nameing
update exposeSmalltalkGlobal:as:. Set the name only on first exposure…
… and honour persistence mode when attaching the constant
make sure we're setting the correct parent namespace
expose the Smalltalk TestCase class for the test
The problem with this implementation is now, that once you persistently expose a smalltalk class, you cannot change its name anymore (or it is very hard). I've played with different ways to fix this, but couldn't come up with a good solution. Is this ok? /cc @jc00ke @pbm
Looks good for now.