[#11073] segfault printing instruction sequence for iterator — <noreply@...>

Bugs item #10527, was opened at 2007-05-02 14:42

14 messages 2007/05/02
[#11142] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Nobuyoshi Nakada <nobu@...> 2007/05/10

Hi,

[#11188] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Paul Brannan <pbrannan@...> 2007/05/16

On Thu, May 10, 2007 at 04:51:18PM +0900, Nobuyoshi Nakada wrote:

[#11234] Planning to release 1.8.6 errata — Urabe Shyouhei <shyouhei@...>

Hi all.

17 messages 2007/05/25

Re: pattern for implementation-private constants?

From: TRANS <transfire@...>
Date: 2007-05-08 16:11:23 UTC
List: ruby-core #11116
On 5/8/07, Paul Brannan <pbrannan@atdesk.com> wrote:
> There are many idioms you could use.  How about:
>
>   class Foo
>     class Private
>       SOME_CONSTANT = 42
>     end
>
>     def foo
>       return Private::SOME_CONSTANT
>     end
>   end
>
> you could also use a class variable:
>
>   class Foo
>     @@private = Private
>     remove_const :Private
>   end

I wouldn't worry about constants. Generally they are used to prime
default instance values. So it's doesn't really matter if they are
publicly accessible or not. Other public usage, such as bit-flags, is
becoming increasingly viewed as arcane.

T.

In This Thread

Prev Next