From: Bulat Ziganshin Date: 2002-10-08T22:22:26+09:00 Subject: Re: Clearing arrays etc. in extensions Hello Mark, Tuesday, October 08, 2002, 5:16:28 PM, you wrote: MP> At 08:53 PM 10/8/2002 +0900, kjana@dm4lab.to wrote: >>That's what done in rb_ary_clear(), implementing Array#clear and >>is exported for C extension in intern.h :-) MP> Thank you so much! I knew that there was a simple answer MP> in there some where. MP> As a general question, using rb_ary_clear(arr) seems clearer MP> than rb_funcall(arr, rb_intern("clear"), 0). Is there any MP> downside (besides the fact that it is "undocumented" and MP> buried in intern.h ;-)? of course! :) it can be overloaded, stolen or made private :) so you must decide what you want - just clear the array or order array to clear itself :) -- Best regards, Bulat mailto:bulatz@integ.ru