[#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

Behaviour of Enumerables reject vs. select mixed into Hash

From: Alexander Presber <aljoscha@...>
Date: 2007-06-19 11:01:57 UTC
List: ruby-core #11504
Hello everybody,

Could you please take a look at the result of the following statements:

irb(main):001:0> a = {'foo' => 'bar', 'baz' => 'qux'}
=> {"baz"=>"qux", "foo"=>"bar"}

irb(main):002:0> a.reject{|k,v| k=='foo' }
=> {"baz"=>"qux"}

irb(main):003:0> a.select{|k,v| k=='baz' }
=> [["baz", "qux"]]

The result of the reject statement is clearly sensible: the original  
hash minus the element with the key 'foo'.
But what about select? Shouldn't it return the same hash (instead of  
an array of key-value pairs)?

Sincerely yours
Alexander Presber

In This Thread

Prev Next