Using ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
I’m going over an old script I wrote and I have an if statement that
basically goes like this:
do something if mystring.include?(“something (word1|word2): something”)
This script worked fine with this for months, but now I’m updating it
and re-“compiling” it with rubyscript2exe. I think I previously
“compiled” it with a prior version of ruby, so that could be the cause
of my current woes. Anyway, the (…|…) part is not working now.
I’m playing around with it in irb and it will only match mystring if I
place word1 or word2 directly into the compare string rather than using
(word1|word2). Does this ability not work anymore? Is there something
equally succint I can do rather than writing out two if statements?