[#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: REXML::Functions.name == nil

From: Florian Gro<florgro@...>
Date: 2004-11-30 01:14:02 UTC
List: ruby-core #3859
Ryan Davis wrote:

> On Nov 29, 2004, at 6:30 AM, Florian Growrote:
>> I'm not sure about .id as that should not be used anymore anyway, (use 
>> .object_id instead) but for REXML::Functions.name a workaround is to 
>> use Module.instance_method(:name).bind(REXML::Functions).call
> 
> I'm not really looking for a workaround. Either I use the workaround 
> every time I need to get the name of a class, or we get this one 
> instance fixed. I don't find that very acceptable, so for now I have to 
> deal with the possibility of a nil name and just fake it.

My point was that the workaround works generally. Use it instead of 
directly calling .name and you will always get the answer you expect. 
The above also generally works if you want to call an original, 
non-overridden method on an Object.

Not that I'm against changing REXML::Functions.name but this is 
something that is frequently useful.


In This Thread