Dave Wilson wrote: > this optimization is used when the regexp is a > a literal, which means you can get by this by not using a regexp > literal, for example: > > pattern = /a/ > # or > pattern = Regexp.new('a') > > "abc" =~ pattern I should clarify: you can use a literal regexp, but not "in-place". the optimization only happens when you match against the literal regexp "in-place", but if you match against a variable that has been assigned a literal regexp, this optimization won't be used. Dave