Skip to content

Commit

Permalink
resurrect Array#nitems temporarily to not break Leopard's /etc/irbrc
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@258 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information
lrz committed Jun 6, 2008
1 parent 4cf9f73 commit 1e9f913
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions array.c
Expand Up @@ -4224,6 +4224,10 @@ Init_Array(void)
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);
Expand Down

0 comments on commit 1e9f913

Please sign in to comment.