From: unbewusst.sein@... (=?ISO-8859-1?Q?Une_B=E9vue?=) Date: 2010-03-12T01:55:07+09:00 Subject: [MacRuby] Re: reading an UTF-8 encoded file Brian Candler wrote: > Perhaps the version of 1.9.0 which macruby forked from was different in > this regard though. Perfectly right, because i read on a MacRuby web page (http://www.macruby.org/documentation/overview.html) : Primitives Classes The primitive Ruby classes (String, Array, and Hash) have been re-implemented on top of their Cocoa equivalents (respectively, NSString, NSArray, and NSDictionary). As an example, String is no longer a class, but a pointer (alias) to NSMutableString. All strings in MacRuby are genuine Cocoa strings and can be passed (without conversion) to underlying C or Objective-C APIs that expect Cocoa strings. The whole String interface was re-implemented on top of NSString. This means that you can call any method of String on any Cocoa string. Because Cocoa strings can be either mutable and immutable, if you try to call a method that is supposed to modify its receiver on an immutable string, a runtime exception will be raised. -- � L'essence m�me du g�nie, c'est de mettre en pratique les id�es les plus simples. � (Charles Peguy)