From: Sean O'Dell Date: 2004-06-22T07:03:49+09:00 Subject: Re: opening a file in ext On Monday 21 June 2004 14:43, Ara.T.Howard wrote: > On Tue, 22 Jun 2004, Sean O'Dell wrote: > > On Monday 21 June 2004 14:25, Sean O'Dell wrote: > >> This should work: > >> > >> return rb_funcall(rb_cFile, rb_intern(":new"), rb_str_new2("filename")); > > > > Oops, try: > > > > return rb_funcall(rb_cFile, rb_intern(":new"), 1, > > rb_str_new2("filename")); > > > > Sean O'Dell > > hmmm. is this really the best way? i mean, why not call the dispatched to > method directly? i suppose this insulates you from name changes - but it > seems like one should be to call it directly doesn't it? Since in C you don't have access to all of the C functions that implement every method in every class, it's simply the most consistent way to make the call. If you know the actual C function name, I'm sure you could call that directly. Sean O'Dell