[#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: Fixnum#clone and Float#clone raise different exceptions

From: Yukihiro Matsumoto <matz@...>
Date: 2004-11-16 13:57:52 UTC
List: ruby-core #3751
Hi,

In message "Re: Fixnum#clone and Float#clone raise different exceptions"
    on Tue, 16 Nov 2004 21:12:30 +0900, "David A. Black" <dblack@wobblini.net> writes:

|Just replying to myself, in the hope of triggering response from Matz
|and others....  This glitch is actually looming fairly large in
|ActiveRecord's clone facility, which stumbles on Floats. 

Hmm, do you mean the fact that clone fails for Numbers etc?

There are two possible behavior for clone:

  * fails for objects whose cloning is meaningless, such as immediates
    (Fixnums, Symbols), and immutables.

  * clone silently gives the receiver for un-clonable objects.

Both have their own pros and cons.  I took the former, but there might
be still room for discussion.

							matz.

In This Thread