[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Iterating a changing Hash under 1.9.1

Yukihiro Matsumoto

2/16/2009 6:32:00 AM

Hi,

In message "Re: Iterating a changing Hash under 1.9.1"
on Mon, 16 Feb 2009 14:28:07 +0900, Tom Link <micathom@gmail.com> writes:

|It shouldn't go into an infinite loop though. IMHO an exception
|("modification during iteration" or something like that) would be
|nice.

Do you think speed decrease for normal case is acceptable?

matz.

2 Answers

Joel VanderWerf

2/16/2009 6:39:00 AM

0

Yukihiro Matsumoto wrote:
> Hi,
>
> In message "Re: Iterating a changing Hash under 1.9.1"
> on Mon, 16 Feb 2009 14:28:07 +0900, Tom Link <micathom@gmail.com> writes:
>
> |It shouldn't go into an infinite loop though. IMHO an exception
> |("modification during iteration" or something like that) would be
> |nice.
>
> Do you think speed decrease for normal case is acceptable?
>
> matz.

It's also worrying that there is no clear definition of "during
iteration", bearing in mind that any method which yields is an iterator,
of sorts. Or would this only apply to a fixed set of core methods?

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

Valery Lapenkov

9/20/2009 3:03:00 PM

0



Alex wrote:
>
> On Sep 20, 10:48 am, Valery Lapenkov <l...@yandex.ru> wrote:
> > Pilgrim wrote:
> >
> > > On 19 ???, 15:41, Alex <rusb...@gmail.com> wrote:
> > > > On 18 ???, 09:03, Valery Lapenkov <l...@yandex.ru> wrote:
> >
> > > > > ???? ?????????? ????? ? ?????.
> >
> > > > ?? ??????? ???????... ??? ?? ???? ??????? ????, ??? ????? ?????. ???
> > > > ?? ?????? ??????????, ???, ?? ?????? ????? ???? ????? ?? ?????????
> > > > ?????????.
> > > > ? ???? ?? ???? ????? ???, ????? ?? ??????? ???? ?????????? ? ????????!
> > > > ????????????????? ??????? ????? ??????????, ??? ??? ???????? ? ?? ????
> > > > ????, ????? ?????.
> >
> > > >www.khazaria.comwww.jewwatch.com
> >
> > > ? ???? ?? ???? ??? ???????? ?? ?? ???? ?? ???? ????????
> >
> > ??????? ?.
> >
> > ?? ??????? ??? ???????? ?????? - ??? ???? ??????????.
>
> ????? ??? ??? ??? ??????, ??????

????? ??.