From: Rick DeNatale Date: 2008-05-31T03:01:26+09:00 Subject: Re: How can a code block access an object's variables? On Thu, May 29, 2008 at 4:29 PM, Robert Klemme wrote: > On 29.05.2008 19:04, Rick DeNatale wrote: >> yield line unless ((line.strip! == "") || (line =~ /[\t+\s+]/)) >> >> But I think that the two line form might be a little clearer. >> >> I'm not sure just what you expect the regex to be doing, as you've >> coded it it's going to skip any line which >> has at least one tab followed immediately by at least one whitespace >> character regardless of anything else in the line. > > No, the complete expression will skip empty lines as well we lines that > contain either a tab, a space (which includes tab IIRC) or a plus sign. Right you are, for some reason I failed to see the square brackets. Maybe I DO need new glasses. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/