lib/cocoa: fix NSString::to_s to use to_s_with_copy
authorAlexis Laferrière <alexis.laf@xymus.net>
Wed, 11 May 2016 17:57:53 +0000 (13:57 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Wed, 11 May 2016 17:58:06 +0000 (13:58 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/cocoa/foundation.nit

index 33114e4..3a6fa98 100644 (file)
@@ -37,7 +37,7 @@ extern class NSString in "ObjC" `{ NSString * `}
        # Get an UTF8 encoded `char*` copy of `self`
        fun utf8_string: NativeString in "ObjC" `{ return (char *)[self UTF8String]; `}
 
-       redef fun to_s do return utf8_string.to_s
+       redef fun to_s do return utf8_string.to_s_with_copy
 end
 
 redef class NativeString