Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
def test_sort_with_replace xary = (1..100).to_a 100.times do ary = (1..100).to_a ary.sort! {|a,b| ary.replace(xary); a <=> b} GC.start assert_equal(xary, ary, '[ruby-dev:34732]') end end #### In MRI 1.8.6 and JRuby: test_sort_with_replace(TestArray): TypeError: can't modify array during iteration
This paste will be private.
From the Design Piracy series on my blog: