[#3726] Fixnum#clone and Float#clone raise different exceptions — "David A. Black" <dblack@...>

Hi --

15 messages 2004/11/12
[#3749] Re: Fixnum#clone and Float#clone raise different exceptions — "David A. Black" <dblack@...> 2004/11/16

Hi --

[#3751] Re: Fixnum#clone and Float#clone raise different exceptions — Yukihiro Matsumoto <matz@...> 2004/11/16

Hi,

[#3752] Re: Fixnum#clone and Float#clone raise different exceptions — "David A. Black" <dblack@...> 2004/11/16

Hi --

[#3785] The latest 1.8.2 cvs prints parse error when starting extension compiling — Yukihiro Matsumoto <matz@...>

Hi,

13 messages 2004/11/23
[#3787] Re: The latest 1.8.2 cvs prints parse error when starting extension compiling — Johan Holmberg <holmberg@...> 2004/11/23

Re: [BUG?] convert_type() uses rb_respond_to()

From: Yukihiro Matsumoto <matz@...>
Date: 2004-11-28 23:23:36 UTC
List: ruby-core #3845
Hi,

In message "Re: [BUG?] convert_type() uses rb_respond_to()"
    on Mon, 29 Nov 2004 00:01:01 +0900, Florian Gro<florgro@gmail.com> 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.


In This Thread