[#70252] Re: [ruby-cvs:58640] nobu:r51492 (trunk): node.c: NODE_ALLOCA for ALLOCV — Eric Wong <normalperson@...>
Besides possible backwards compatibility, can we drop volatile
3 messages
2015/08/05
[#70257] [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI — ko1@...
Issue #11420 has been reported by Koichi Sasada.
11 messages
2015/08/06
[#70337] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI
— Eric Wong <normalperson@...>
2015/08/11
Nice. Thank you guys for looking into this.
[#70349] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI
— Eric Wong <normalperson@...>
2015/08/12
Btw, did you consider using flexible array to avoid extra malloc
[#70355] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI
— Юрий Соколов <funny.falcon@...>
2015/08/12
I thought to suggest to embed hash_id_table directly into places when it is
[#70356] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI
— SASADA Koichi <ko1@...>
2015/08/12
On 2015/08/13 4:29, Юрий Соколов wrote:
[#70358] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI
— Eric Wong <normalperson@...>
2015/08/12
SASADA Koichi <ko1@atdot.net> wrote:
[#70509] [Ruby trunk - Misc #11276] [RFC] compile.c: convert to use ccan/list — ko1@...
Issue #11276 has been updated by Koichi Sasada.
3 messages
2015/08/21
[#70639] the undefined behavior of an iterator if it is modified inside of the block to which it yields — Daniel Doubrovkine <dblock@...>
(this is my first time e-mailing list list, so apologies for any misstep :)
4 messages
2015/08/31
[ruby-core:70639] the undefined behavior of an iterator if it is modified inside of the block to which it yields
From:
Daniel Doubrovkine <dblock@...>
Date:
2015-08-31 16:08:09 UTC
List:
ruby-core #70639
(this is my first time e-mailing list list, so apologies for any misstep :) I wanted to bring up the behavior of an iterator if it is modified inside of the block to which it yields. I ran into this in https://github.com/rubinius/rubinius/issues/3494 and it has already been discussed in https://github.com/rubinius/rubinius/issues/547 (and I am sure elsewhere). These issues repeatedly get closed with "mutating a collection while iterating over it is unsupported". And this has been brought up on this list, see http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/23633 to which Matz replied: It is undefined behavior of iterators if the block modifies iterating object. It may crash or fall in to infinite loop. This all seems to make sense, however right now at least two Ruby implementations have predictably different behaviors (MRI vs. Rubinius) and there're clearly some gems (eg. https://github.com/joeyAghion/spidey) that rely on this (likely incorrectly). But that itself doesn't mean much, it's just for context. I'd like to suggest we change the behavior from "undefined" to "defined" in some future version of Ruby. It seems that in the real world such behavior is very well defined, ie. if you're climbing an escalator and a step appears in front of you before you jump off, you're going to be stepping on it and not having "undefined" behavior :) Any thoughts? Thanks! -dB. -- dB. | Moscow - Geneva - Seattle - New York code.dblock.org - @dblockdotorg <http://twitter.com/#!/dblockdotorg> - artsy.net - github/dblock <https://github.com/dblock>