[#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: Austin Ziegler <halostatue@...>
Date: 2004-11-30 01:05:34 UTC
List: ruby-core #3858
On Tue, 30 Nov 2004 09:53:38 +0900, Ryan Davis <ryand@zenspider.com> wrote:
> On Nov 29, 2004, at 6:30 AM, Florian Growrote:
> > Ryan Davis wrote:
> >> I found this oddity while running ParseTree over every .rb file in
> >> the ruby libs:
> >>> irb(main):003:0> REXML::Functions.name
> >>> => nil
> >> sure enough, Functions::name is defined. This seems bad to me. It
> >> also defines id and breaks it too:
> >>> irb(main):004:0> Class.id
> >>> => 974456
> >>> irb(main):005:0> REXML::Functions.id
> >>> ArgumentError: wrong number of arguments (0 for 1)
> >> Can we get these renamed or otherwise make them work with their
> >> regular semantics?
> > 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
> Until .id is removed from the vocabulary (and probably a long while
> afterwards so that people can assume backwards compatibility), it
> shouldn't be overridden.

I personally always use #__id__ when I need the object's ID, not #id
or #object_id. Maybe we need a #__name__ as well? #__id__ shouldn't be
overridden.

-austin
-- 
Austin Ziegler * halostatue@gmail.com
               * Alternate: austin@halostatue.ca


In This Thread