[#18121] [Ruby 1.8.7 - Bug #405] (Open) ssl.rb:31: [BUG] Bus Error — Anonymous <redmine@...>

Issue #405 has been reported by Anonymous.

14 messages 2008/08/04

[#18130] Re: New array methods cycle, choice, shuffle (plus bug in cycle) — Brian Candler <B.Candler@...>

> Seriously though... Array.first is a noun.

10 messages 2008/08/05

[#18319] NEW Command: absolute_path() -- — "C.E. Thornton" <admin@...>

Core,

14 messages 2008/08/16
[#18321] Re: NEW Command: absolute_path() -- — Yukihiro Matsumoto <matz@...> 2008/08/18

Hi,

[#18381] [Bug #496] DRb.start_service(nil) is very slow — Hongli Lai <redmine@...>

Bug #496: DRb.start_service(nil) is very slow

11 messages 2008/08/25

[ruby-core:18069] Re: New array methods cycle, choice, shuffle (plus bug in cycle)

From: "Gregory Brown" <gregory.t.brown@...>
Date: 2008-08-01 19:24:34 UTC
List: ruby-core #18069
On Fri, Aug 1, 2008 at 3:12 PM, David A. Black <dblack@rubypal.com> wrote:

>>> What about:
>>>
>>>    array.random_choice
>>
>> This would be a suitable analogy to Python's random.choice(array) ...
>> but is almost as long and only slightly more readable than:
>
> I'm not sure why Python is involved at all. I'd encourage Matz (hi
> Matz! :-) not to take Python into consideration here. It's not like
> they invented the idea of taking a random element.  Making up a new
> name for 'curry', say, might be questionable, but I don't think
> there's anything canonical about what a random-element method happens
> to be called in Python.

I agree with you, but my originally point was mainly that, despite the
fact that the method is called choice() in Python,
it loses its clarity as soon as you remove the "random." from its
invocation.  But if Matz really does like the name, I think
array.random_choice is definitely more clear than array.choice.

-greg

-- 
Killer Ruby PDF Generation named after a magnificent sea creature:
http://github.com/sandal/prawn | Non-tech stuff at:
http://metametta.blogspot.com

In This Thread