Created
October 23, 2013 09:28
-
-
Save benedikt/7115437 to your computer and use it in GitHub Desktop.
Revisions
-
benedikt created this gist
Oct 23, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ array = [1, 2] array.each { |n| array << n * 2; break if n > 10 } array # ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.4.0] # => [1, 2, 2, 4, 4, 8, 8, 16, 16, 32] # rubinius 2.1.1 (2.1.0 be67ed17 2013-10-18 JI) [x86_64-darwin12.5.0] # => [1, 2, 2, 4]