[MacRuby] #1314: Objective-C methods with null-terminated arguments have a subtle issue
MacRuby
ruby-noreply at macosforge.org
Thu Jun 30 07:23:34 PDT 2011
#1314: Objective-C methods with null-terminated arguments have a subtle issue
------------------------------------+---------------------------------------
Reporter: mrada@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: critical | Milestone:
Component: MacRuby | Keywords: reduction
------------------------------------+---------------------------------------
Comment(by watson1978@…):
Objective-C also seems to create an empty array.
{{{
#import <Cocoa/Cocoa.h>
int main(void)
{
NSArray *ary = [[NSArray alloc] initWithObjects:nil,@"a",@"b",@"c"];
NSLog(@"%d", [ary count]);
}
}}}
{{{
$ gcc test_array.m -framework Cocoa
$ ./a.out
2011-06-30 23:20:45.852 a.out[27488:903] 0
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/1314#comment:1>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list