[#25936] [Bug:1.9] [rubygems] $LOAD_PATH includes bin directory — Nobuyoshi Nakada <nobu@...>

Hi,

10 messages 2009/10/05

[#25943] Disabling tainting — Tony Arcieri <tony@...>

Would it make sense to have a flag passed to the interpreter on startup that

16 messages 2009/10/05

[#26028] [Bug #2189] Math.atanh(1) & Math.atanh(-1) should not raise an error — Marc-Andre Lafortune <redmine@...>

Bug #2189: Math.atanh(1) & Math.atanh(-1) should not raise an error

14 messages 2009/10/10

[#26222] [Bug #2250] IO::for_fd() objects' finalization dangerously closes underlying fds — Mike Pomraning <redmine@...>

Bug #2250: IO::for_fd() objects' finalization dangerously closes underlying fds

11 messages 2009/10/22

[#26244] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context fails — Suraj Kurapati <redmine@...>

Bug #2258: Kernel#require inside rb_require() inside rb_protect() inside SysV context fails

24 messages 2009/10/22

[#26361] [Feature #2294] [PATCH] ruby_bind_stack() to embed Ruby in coroutine — Suraj Kurapati <redmine@...>

Feature #2294: [PATCH] ruby_bind_stack() to embed Ruby in coroutine

42 messages 2009/10/27

[#26371] [Bug #2295] segmentation faults — tomer doron <redmine@...>

Bug #2295: segmentation faults

16 messages 2009/10/27

[ruby-core:25933] Re: [Bug #2114] Array Hash inconsistency

From: Yukihiro Matsumoto <matz@...>
Date: 2009-10-04 13:39:05 UTC
List: ruby-core #25933
Hi,

In message "Re: [ruby-core:25835] [Bug #2114] Array Hash inconsistency"
    on Tue, 29 Sep 2009 17:29:47 +0900, Wim Yedema <redmine@ruby-lang.org> writes:

|I believe the essence of a Hash table is the mapping from key to value. This mapping is a surjective function a key maps to one value but multiple keys can map to the same value. This essence does not seem to be represented by modelling the Hash as a collection of key-value pairs. It allows the a key to occur multiple times and to map to different values. This essence is also present in Arrays, but in a more specialized form where keys are integers. For me this is the reason to prefer this view.

Seeing Hash as collection of key-value pair does not directly mean
allowing keys to appear multiple times.  For example, Set is a
collection of values, but the value should be unique.

|Be that as it may, it's not worth it to break a lot of existing code over this. It might be nice to provide an alternate interface to the Hash implementation, such that a programmer can choose his favorite view.

Proposal for API is welcome.

							matz.

In This Thread