From: Charles Mills Date: 2004-01-20T01:53:02+09:00 Subject: Re: calling ruby methods in C On Mon, 19 Jan 2004, Charles Mills wrote: > VALUE arr = rb_ary_new2(some_num); > VALUE some_obj = ...; > rb_ary_push(arr, some_obj); > > or this: > > VALUE arr = rb_ary_new2(some_num); > VALUE some_obj = ...; > rb_funcall(arr, rb_intern("push"), 1, some_obj); > > So my main question is: > should you only call the C function defined in "ruby.h" directly (not > using rb_funcall) in you extensions or is it OK to call the C functions > defined in "intern.h" directly as well? Looks like this question was mostly answered by this post http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/1807 but the question still remains is it better to use rb_funcall to invoke the Ruby method or call the corresponding C function directly? -Charlie