[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: How can a code block access an object's variables?
From:       "Rick DeNatale" <rick.denatale () gmail ! com>
Date:       2008-05-30 18:01:26
Message-ID: deb2337a0805301101kda6c422od39272124ffdf9c9 () mail ! gmail ! com
[Download RAW message or body]

On Thu, May 29, 2008 at 4:29 PM, Robert Klemme
<shortcutter@googlemail.com> 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. <G>
-- 
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic