Hello - Recently we tried to override / replace the rexml/encoding.rb
method
encoding= in order to see if we could increase performance of the
encoding=
method by inlining the UTF-8 encoding so it did not hit the require
code.
When we did this the replacement method was called “some of the time”.
We
added print statements to show when the old and when the new method were
called. Much to our surprise we found that the old method was called
even
after the new method “replaced” the old method. In this case it seems
like
the “rexml/document” document class via the “rexml/xmldecl” class
maintained
the connection to the old method whereas the other classes that use the
encoding.rb used the new method. Has anyone seen this behavior before?
BTW
- when we did a trace the xml-simple-1.0.rb was initializing before any
of
our scripts were run and as a result the binding of rexml/document →
rexml/xmldecl → rexml/encoding seems to have been made - and it
appears
once this binding has occured it does not get broken.
–
View this message in context:
http://www.nabble.com/Unable-to-replace-rexml-encoding-method-with-new-method-consistently-tp17786817p17786817.html
Sent from the JRuby - User mailing list archive at Nabble.com.
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email