matz / netlab.co.jp (Yukihiro Matsumoto) writes:

>   1 while gsub!(...) && $~
>                     ^^^^^^
> is a workaround for this case.

And it's in the FAQ!