[MacRuby-devel] MR methods vs MRI methods?
Laurent Sansonetti
lsansonetti at apple.com
Tue Oct 14 13:59:26 PDT 2008
On Oct 14, 2008, at 11:20 AM, Richard Kilmer wrote:
>
> On Oct 14, 2008, at 12:53 PM, Rich Morin wrote:
>
>> Reading the MR intro, I get the impression that MR inherits all
>> of the methods that apply to the relevant Cocoa objects. Does
>> this imply that the normal MRI methods aren't supported? If
>> not, are there any naming conflicts to be concerned about?
>
> I believe that the goal is for MacRuby String methods, FixNum methods,
> Hash methods, etc all to perform as they do under MRI 1.9.
>
> Tests would confirm this, of course.
Rich is right, it is the objective to support all the MRI methods. We
are for example able to run most of test_string.rb, test_array.rb and
test_hash.rb (the current test failures are not really important).
So far except for a couple of exceptions (that are taken into account)
there weren't any naming conflicts.
$ macirb
>> s = 'foo'
=> "foo"
>> s.class.ancestors
=> [NSMutableString, NSString, Comparable, NSObject, Kernel]
>> s.class == String
=> true
>> s.capitalize
=> "Foo"
>> s.capitalizedString
=> "Foo"
Laurent
More information about the MacRuby-devel
mailing list