[macruby-changes] [258] MacRuby/trunk/array.c

source_changes at macosforge.org source_changes at macosforge.org
Fri Jun 6 12:48:21 PDT 2008


Revision: 258
          http://trac.macosforge.org/projects/ruby/changeset/258
Author:   lsansonetti at apple.com
Date:     2008-06-06 12:48:20 -0700 (Fri, 06 Jun 2008)

Log Message:
-----------
resurrect Array#nitems temporarily to not break Leopard's /etc/irbrc

Modified Paths:
--------------
    MacRuby/trunk/array.c

Modified: MacRuby/trunk/array.c
===================================================================
--- MacRuby/trunk/array.c	2008-06-06 19:44:11 UTC (rev 257)
+++ MacRuby/trunk/array.c	2008-06-06 19:48:20 UTC (rev 258)
@@ -4224,6 +4224,10 @@
     rb_define_method(rb_cArray, "flatten", rb_ary_flatten, -1);
     rb_define_method(rb_cArray, "flatten!", rb_ary_flatten_bang, -1);
     rb_define_method(rb_cArray, "_count", rb_ary_count, -1);
+#if WITH_OBJC
+    /* to maintain backwards compatibility with our /etc/irbrc file */
+    rb_define_method(rb_cArray, "nitems", rb_ary_count, -1);
+#endif
     rb_define_method(rb_cArray, "shuffle!", rb_ary_shuffle_bang, 0);
     rb_define_method(rb_cArray, "shuffle", rb_ary_shuffle, 0);
     rb_define_method(rb_cArray, "choice", rb_ary_choice, 0);

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macruby-changes/attachments/20080606/633b8314/attachment-0001.htm 


More information about the macruby-changes mailing list