[#11439] comments needed for Random class — "NAKAMURA, Hiroshi" <nakahiro@...>

-----BEGIN PGP SIGNED MESSAGE-----

15 messages 2007/06/12

[#11450] Re: new method dispatch rule (matz' proposal) — David Flanagan <david@...>

This is a late response to the very long thread that started back in

17 messages 2007/06/13

[#11482] Ruby Changes Its Mind About Non-Word Characters — James Edward Gray II <james@...>

Does this look like a bug to anyone else?

10 messages 2007/06/16

[#11505] Question about the patchlevel release cycle — Sylvain Joyeux <sylvain.joyeux@...4x.org>

1.8.6 thread support was broken in bad ways. It stayed for three months

20 messages 2007/06/20
[#11512] Re: Question about the patchlevel release cycle — Urabe Shyouhei <shyouhei@...> 2007/06/20

Hi, I'm the 1.8.6 branch manager.

[#11543] Re: Apple reportedly to ship with ruby 1.8.6-p36 unless informed what to patch — James Edward Gray II <james@...>

On Jun 27, 2007, at 4:47 PM, Bill Kelly wrote:

10 messages 2007/06/27

Name of Classes

From: =?ISO-8859-15?Q?Wolfgang_N=E1dasi-Donner?= <wonado@...>
Date: 2007-06-28 23:04:35 UTC
List: ruby-core #11555
Moin, moin!

During a discussion about dynamic class construction in german 
Ruby-Forum I recognized strange behavior of the name associated to the 
class. Example (Ruby OneClickInstaller-186-25):

 >>>>> snip >>>>>

irb(main):001:0> a = Class.new
=> #<Class:0x30f00c0>
irb(main):002:0> a.new.class
=> #<Class:0x30f00c0>
irb(main):003:0> A = a
=> A
irb(main):004:0> AA = a
=> A
irb(main):005:0> AA.new.class
=> A
irb(main):006:0> a.new.class
=> A
irb(main):007:0> class Object; remove_const(:A); end
=> A
irb(main):008:0> A
NameError: uninitialized constant A
        from (irb):8
irb(main):009:0> a.new.class
=> A
irb(main):010:0> class A
irb(main):011:1>   def hi
irb(main):012:2>      puts "hi!"
irb(main):013:2>   end
irb(main):014:1> end
=> nil
irb(main):015:0> A.new.hi
hi!
=> nil
irb(main):016:0> A.new.class
=> A
irb(main):017:0> a
=> A
irb(main):018:0> a.new.class
=> A
irb(main):019:0> a.new.hi
NoMethodError: undefined method `hi' for #<A:0x30d4cbc>
        from (irb):19

 >>>>> snap >>>>>

For me it looks like an error that the name "A" will still be actual 
after the deletion of the constant.

Wolfgang N疆asi-Donner

In This Thread

Prev Next