From: "David A. Black" Date: 2005-05-13T04:46:39+09:00 Subject: Re: [ ruby-Patches-1900 ] Pointless argc check in Array#select Hi -- On Fri, 13 May 2005, Daniel Berger wrote: > Austin Ziegler wrote: >> On 5/12/05, ts wrote: >> >>>>>>>> "D" == Daniel Berger writes: >>> >>> D> Strangely, though, I can't get this test to pass: >>> D> assert_raises(LocalJumpError){ [].select } >>> Why do you want that it raise an error ? >> >> >> Daniel is adding to the test suite for Ruby to verify that things do >> what they're supposed to do. >> >> -austin > > Ah, here's the issue. > > # test.rb > a = [1,2,3] > a.select # LocalJumpError > > [].select # no error > > I'd call that a bug. I guess I better get crackin' with that test suite, eh? Just to throw in the counter-argument: Since the block would never be executed with an empty array anyway, why enforce its presence? David -- David A. Black dblack@wobblini.net