From: Mark Probert Date: 2002-10-08T05:54:30+09:00 Subject: Clearing arrays etc. in extensions Hi, How do I clear the contents of an array or hash in an extension? Setting the pointer to nil just doesn't seem to be right... static VALUE t_reset (VALUE self) { VALUE arr; arr = rb_iv_get(self, "@arr"); RARRAY(arr)->ptr = '\0'; /* ??? */ return Qnil; } Thanks, -mark.