Daniel Berger wrote: > Hi, > > In enum.c there's this bit of code in the sort_by_i function. > > if(RBASIC(ary)->klass) { > rb_raise(rb_eRuntimeError, "sort_by reentered"); > } > > Can you show me a test case where this error can happen? Just curious. > > Thanks, > > Dan > From: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-dev/24399 $res = $k = nil # reduce warnings (daz) arr = (1..100).to_a $res = arr.sort_by {|v| callcc {|k| $k = k } unless $k p $res if $res v } $k.call #Output: [1, 2, 3, 4, 5, 6, 7, 8, 9 ...] rb1203.tmp:8:in `sort_by': sort_by reentered (RuntimeError) from rb1203.tmp:3 Complete(1) (I can't explain - just researching) :) daz