reference [Bug #8612]
the scope of regexp special global variable is changed from 2.0 to trunk.
I think better some methods should not use special global variable.
This issue was solved with changeset r42013.
Takeyuki, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
lib/erb.rb (ERB::Util#url_encode): Unuse regexp special global
variable. [Feature #8648] Thanks to fotos.