Hi,
there is a Ruby constant resolution problem because of how the #escaped_expr(code) method works. It returns a string
containing the value of @escapefunc which contains "Erubis::XmlHelper" for Erubis::Eruby.
When using a class called Erubis, the resolution of the XmlHelper module does not work anymore.
How to reproduce:
require 'erubis'
module MyModule
class Erubis
def convert(text)
::Erubis::Eruby.new(text).result(binding)
end
end
end
MyModule::Erubis.new.convert("<%== 'some < text' %>")
The following error is thrown:
NameError: uninitialized constant MyModule::Erubis::XmlHelper
This seems to come from the string "Erubis::XmlHelper" being evaluated inside MyModule::Erubis.
-- Thomas |