Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
libxml-ruby-1.1.3 for libxml2-2.9
diff --git a/vendor/gems/libxml-ruby-1.1.3/ext/libxml/ruby_xml_node.c b/vendor/gems/libxml-ruby-1.1.3/ext/libxml/ruby_xml_node.c
index ed058d2..7c48017 100644
--- a/vendor/gems/libxml-ruby-1.1.3/ext/libxml/ruby_xml_node.c
+++ b/vendor/gems/libxml-ruby-1.1.3/ext/libxml/ruby_xml_node.c
@@ -571,10 +571,17 @@ static VALUE rxml_node_to_s(int argc, VALUE *argv, VALUE self)
xmlNodeDumpOutput(output, xnode->doc, xnode, level, indent, xencoding);
+ if (output->conv)
+ result = rxml_new_cstr((const char*) xmlBufContent(output->conv), xencoding);
+ else
+ result = rxml_new_cstr((const char*) xmlBufContent(output->buffer), xencoding);
if (output->conv)
result = rb_str_new2((const char*) output->conv->content);
result = rb_str_new2((const char*) output->buffer->content);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment