Hello, I've just installed libxml-ruby 1.1.3 via gem install with no errors/warnings. I then try to run gem check -t libxml-ruby and all hell breaks loose with deprecation warnings, errors and finally some malloc free errors (see below). Is this 'expected' behavior, or does it look like I missing something critical?
i've got: libxml2 v. 2.6.32_1, installed via macports, though i see another libxml2 in /usr/lib (how do i check which is being used?) libm in /usr/lib libz (1.2.3) in /usr/lib libiconv (2.4.0) in /usr/lib Mac OS X 10.5 Here's what I get when I try to run unit tests via gem (and I notice the failed to load external entity error when I try to parse my own XML document): > gem check -t libxml-ruby Node#child_add is deprecated. Use Node#<< instead. Error: Element 'invalid': This element is not expected. Expected is ( item ).. Warning: failed to load external entity "i_dont_exist.xml". Fatal error: Premature end of data in tag Results line 1 at :2. Warning: xmlParsePITarget: invalid name prefix 'xml' at :2. Node#child_add is deprecated. Use Node#<< instead. Error: Did not expect element invalid there. set_error_handler is deprecated. Use Error.set_handler instead set_error_handler is deprecated. Use Error.set_handler instead reset_error_handler is deprecated. Use Error.reset_handler instead Node#properties is deprecated. Use Node#attributes instead. Node#properties is deprecated. Use Node#attributes instead. ./test/tc_parser.rb:289: warning: Passing no parameters to XML::Parser.new is deprecated. Pass an instance of XML::Parser::Context instead. XML::Parser#document= is deprecated. Use XML::Parser.document= instead Error: test_fd_gc(TestParser): LibXML::XML::Error: Warning: failed to load external entity "./test/model/rubynet.xml". /opt/local/lib/ruby/gems/1.8/gems/libxml-ruby-1.1.3/lib/libxml/parser.rb:33:in `file' /opt/local/lib/ruby/gems/1.8/gems/libxml-ruby-1.1.3/lib/libxml/parser.rb:33:in `file' ./test/tc_parser.rb:233:in `test_fd_gc' ./test/tc_parser.rb:232:in `times' ./test/tc_parser.rb:232:in `test_fd_gc' Node#base is deprecated. Use Node#base_uri. Node#base is deprecated. Use Node#base_uri. ./test/tc_parser.rb:300: warning: Passing no parameters to XML::Parser.new is deprecated. Pass an instance of XML::Parser::Context instead. XML::Parser#file is deprecated. Use XML::Parser.file instead ./test/tc_parser.rb:309: warning: Passing no parameters to XML::Parser.new is deprecated. Pass an instance of XML::Parser::Context instead. XML::Parser#io is deprecated. Use XML::Parser.io instead ./test/tc_parser.rb:322: warning: Passing no parameters to XML::Parser.new is deprecated. Pass an instance of XML::Parser::Context instead. XML::Parser#string is deprecated. Use XML::Parser.string instead Node#base is deprecated. Use Node#base_uri. ELEMENT bands [more document elements..] Node#child_add is deprecated. Use Node#<< instead. Node#child_add is deprecated. Use Node#<< instead. Node#base is deprecated. Use Node#base_uri. Parser.register_error_handler is deprecated. Use Error.set_handler instead Failure: test_double_parse(TestError) [./test/tc_error.rb:116]: <RuntimeError> exception expected but was Class: <LibXML::XML::Error> Message: <"Fatal error: Document is empty at :1."> ---Backtrace--- ./test/tc_error.rb:118:in `parse' ./test/tc_error.rb:118:in `test_double_parse' ./test/tc_error.rb:116:in `test_double_parse' --------------- Error: test_handler(TestError): ArgumentError: wrong number of arguments (1 for 0) ./test/tc_error.rb:19:in `initialize' ./test/tc_error.rb:19:in `new' ./test/tc_error.rb:19:in `test_handler' ./test/tc_error.rb:125: warning: Passing no parameters to XML::Parser.new is deprecated. Pass an instance of XML::Parser::Context instead. XML::Parser#string is deprecated. Use XML::Parser.string instead XML::Parser#string is deprecated. Use XML::Parser.string instead Error: test_libxml_parser_empty_string(TestError): ArgumentError: Must specify a string with one or more characters /opt/local/lib/ruby/gems/1.8/gems/libxml-ruby-1.1.3/lib/libxml/parser.rb:126:in `string' /opt/local/lib/ruby/gems/1.8/gems/libxml-ruby-1.1.3/lib/libxml/parser.rb:126:in `string=' ./test/tc_error.rb:131:in `test_libxml_parser_empty_string' ./test/tc_error.rb:70: warning: already initialized constant STDERR ./test/tc_error.rb:76: warning: already initialized constant STDERR Error: test_parse_error(TestError): NameError: uninitialized constant LibXML::XML::Error::XML_FROM_PARSER ./test/tc_error.rb:88:in `test_parse_error' Error: test_reset_handler(TestError): ArgumentError: wrong number of arguments (1 for 0) ./test/tc_error.rb:45:in `initialize' ./test/tc_error.rb:45:in `new' ./test/tc_error.rb:45:in `test_reset_handler' ./test/tc_error.rb:54: warning: already initialized constant STDERR ./test/tc_error.rb:60: warning: already initialized constant STDERR Error: Invalid predicate. xmlXPathEval: evaluation failed Failure: test_xpath_error(TestError) [./test/tc_error.rb:103]: <"Error: Invalid predicate at :0."> expected but was <"Error: Invalid predicate.">. Failure: test_external_dtd(TestDtd) [./test/tc_dtd.rb:110]: <1> expected but was <0>. Node#child_add is deprecated. Use Node#<< instead. Failure: test_invalid(TestDtd) [./test/tc_dtd.rb:68]: <LibXML::XML::Error> exception expected but was Class: <NotImplementedError> Message: <"method `respond_to?' called on terminated object (0xa05ac690)"> ---Backtrace--- ./test/tc_dtd.rb:69:in `validate' ./test/tc_dtd.rb:69:in `test_invalid' ./test/tc_dtd.rb:68:in `test_invalid' --------------- DOCUMENT version=1.0 encoding=utf-8 URL=./test/model/bands.xml standalone=true ELEMENT bands [more document elements...] Failure: test_save_iso_8859_1(TestDocumentWrite) [./test/tc_document_write.rb:96]: <"<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<bands genre=\"metal\">\n <m\366tley_cr\374e country=\"us\">An American heavy metal band formed in Los Angeles, California in 1981.</m\366tley_cr\374e>\n <iron_maiden country=\"uk\">British heavy metal band formed in 1975.</iron_maiden>\n</bands>\n"> expected but was <"\037\213\b\000\000\000\000\000\000\003}\217\273\n\...@\020e\373|\3050\265\257-\304\004\222\225h%\b\026~\200\254\311\230\f\356\316\302n\024\363\343V\026\306T\251\254\017\367\034n\276}9\vO\n\221\275\024\250\026+\004\222\312\327,M\201\207\363i\236\246\353l\256p\253\223\374j\244\216\320\220\004*\320Qg,\352\004 w\357\316R\177\251\302\207\240\362\017\351B_\340#\242.\005JG\201+#\320\222y\3660\256\340'\202\233\017\216j`\201\243\217PJC\226\342\f\366\306\362\200\204\315\017\251,U\213|9)\214E\016^.\316pM2)\336Q\357\002w\034\333\1775\225m\326\203r\242\030\256-\307o:\371\002o\213d#\020\001\000\000">. Failure: test_save_iso_8859_1_no_indent(TestDocumentWrite) [./test/tc_document_write.rb:108]: [similar 'expected X but was Y' error msg] Failure: test_save_utf8(TestDocumentWrite) [./test/tc_document_write.rb:71]: [similar 'expected X but was Y' error msg] Failure: test_save_utf8_no_indents(TestDocumentWrite) [./test/tc_document_write.rb:84]: [similar 'expected X but was Y' error msg] Node#properties is deprecated. Use Node#[] instead. The XML::NS class is deprecated. Use XML::Namespace instead. ruby(6664) malloc: *** error for object 0x8bb000: double free *** set a breakpoint in malloc_error_break to debug ruby(6664) malloc: *** error for object 0xc0a92913: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug ruby(6664) malloc: *** error for object 0x2a4bfe0: double free *** set a breakpoint in malloc_error_break to debug ruby(6664) malloc: *** error for object 0x2a4c250: incorrect checksum for freed object - object was probably modified after being freed. *** set a breakpoint in malloc_error_break to debug ruby(6664) malloc: *** error for object 0x4: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug ruby(6664) malloc: *** error for object 0x2a4bfe0: double free *** set a breakpoint in malloc_error_break to debug ruby(6664) malloc: *** error for object 0x2a4bfe0: incorrect checksum for freed object - object was probably modified after being freed. *** set a breakpoint in malloc_error_break to debug Failure: test_register_default_ns(TestXPath) [./test/tc_xpath.rb:98]: <LibXML::XML::Error> exception expected but was Class: <NotImplementedError> Message: <"method `respond_to?' called on terminated object (0xa05ac690)"> ---Backtrace--- /opt/local/lib/ruby/gems/1.8/gems/libxml-ruby-1.1.3/lib/libxml/document.rb:119:in `find' /opt/local/lib/ruby/gems/1.8/gems/libxml-ruby-1.1.3/lib/libxml/document.rb:119:in `find' ./test/tc_xpath.rb:99:in `test_register_default_ns' ./test/tc_xpath.rb:98:in `test_register_default_ns' --------------- ERROR: 305 tests, 1284 assertions, 9 failures, 5 errors Anything obvious? Thanks, bp _______________________________________________ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel