From: Yukihiro Matsumoto Date: 2004-11-29T08:23:36+09:00 Subject: Re: [BUG?] convert_type() uses rb_respond_to() Hi, In message "Re: [BUG?] convert_type() uses rb_respond_to()" on Mon, 29 Nov 2004 00:01:01 +0900, Florian Gro� writes: |> I think so. My opinion is that "respond_to?" of proxy object should |> be overridden to delegate unknown method names to the remote object, |> when method_missing is used extensively. | |This sounds good -- so convert_type() should basically use |RTEST(rb_funcall(val, rb_intern("respond_to?"), 1, ID2SYM(m))) instead |of directly using rb_respond_to? Wait, I have forgotten one factor: performance. I just remembered that I wanted to avoid capturing exception by using rb_respond_to(). Since rb_funcall() is much slower than capturing, I'd call "to_ary" directly. respond_to? method should check remote object anyway. matz.