From: Nikolai Weibull Date: 2011-12-23T08:41:35+09:00 Subject: [ruby-core:41787] Breaking while loading Hi! Here���s a problem that I���m not surprised hasn���t come up before. Breaking an iteration from inside a load raises LocalJumpError. Is this a bug? If not, how do I work around it? b.rb: $block.call 1 $block.call 2 $block.call 3 class A include Enumerable def each(&block) $block = block load 'b.rb', true self end end p A.new.take_while{ |i| i < 3 } % ruby -v ruby 1.9.3p0 (2011-10-30 revision 33569) [x86_64-darwin10.8.0] % ruby -w a.rb a.rb:22:in `load': unexpected break (LocalJumpError) from a.rb:22:in `each' from a.rb:27:in `take_while' from a.rb:27:in `
'