From: Bertram Scharpf Date: 2007-07-27T00:34:55+09:00 Subject: Re: help if else Hi, Am Freitag, 27. Jul 2007, 00:21:31 +0900 schrieb Ben Bleything: > On Thu, Jul 26, 2007, Tonyrrr Tonyroor wrote: > > if ((( chaine[i+14] == "twincards>false > == "twincards>true > xsi:nil="1"/")) > > You're closing one too many sets of parents after the "true" > conditional. > > You might want to rewrite it for better legibility, too. A suggestion: > > test = chaine[ i + 14 ] > if test == 'twincards>false test == 'twincards>true test == 'twincards xsi:nil="1"/' It's not only legibility, it's enough to calculate c[i+14] once as the result is every time the same. Another suggestion: case chaine[ i+14] when %r{twincards>(true|false)