From: Josh Cheek Date: 2010-11-25T00:21:18+09:00 Subject: Re: break from a block --00163630e86966b9050495ce00ab Content-Type: text/plain; charset=ISO-8859-1 2010/11/24 Eva > Hi, > > How to break a block with such the method like each? > for example: > > File.new("big.txt").each do |s| > if s =~ /abcd/ > puts s break # is this right? > end > end > > > Thanks! > Yes. Does it not work when you run it? --00163630e86966b9050495ce00ab--