[#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-29 16:05:34 UTC
List: ruby-core #3855
Hi,

In message "Re: [BUG?] convert_type() uses rb_respond_to()"
    on Mon, 29 Nov 2004 23:13:59 +0900, Florian Gro<florgro@gmail.com> writes:

|> respond_to? method should check remote object anyway.
|
|Hm, so will this be changed so that Ruby uses duck-typing in this case? 
|(i.e. just calling the method and raising a different exception instead 
|of using rb_respond_to())

Yes.  Already changed on CVS HEAD.

|Or am I misunderstanding and this issue should be solved by manually 
|adding .to_ary, .to_int and so on to proxy Objects? (so that the 
|rb_respond_to() check succeeds)

No.  But I recommend proxy authors to delegate respond_to? request to
the remote object, i.e.

  def respond_to?(method)
    return true if super(method)
    # consider remote_invoke as remote object invocation
    return remote_object.remote_invoke(:respond_to?, method)
  end

							matz.


In This Thread

Prev Next