So, this should be the patch.

Index: ext/xml/ruby_xml_xpath.c
===================================================================
--- ext/xml/ruby_xml_xpath.c    (revision 218)
+++ ext/xml/ruby_xml_xpath.c    (working copy)
@@ -76,9 +76,9 @@
     }
     else {
       // tuples of prefix/uri
-      if (RARRAY(RARRAY(nslist)->ptr[i])->len == 2) {
-       rprefix = RARRAY(RARRAY(nslist)->ptr[i])->ptr[0];
-       ruri = RARRAY(RARRAY(nslist)->ptr[i])->ptr[1];
+      if (RARRAY(nslist)->len == 2) {
+       rprefix = RARRAY(nslist)->ptr[0];
+       ruri = RARRAY(nslist)->ptr[1];
        ruby_xml_xpath_context_register_namespace(xxpc, rprefix, ruri);
       } else {
        rb_raise(rb_eArgError, "nested array must be an array of
strings, prefix and href/uri");
Index: ext/xml/ruby_xml_xpath.c
===================================================================
--- ext/xml/ruby_xml_xpath.c    (revision 218)
+++ ext/xml/ruby_xml_xpath.c    (working copy)
@@ -76,9 +76,9 @@
     }
     else {
       // tuples of prefix/uri
-      if (RARRAY(RARRAY(nslist)->ptr[i])->len == 2) {
-       rprefix = RARRAY(RARRAY(nslist)->ptr[i])->ptr[0];
-       ruri = RARRAY(RARRAY(nslist)->ptr[i])->ptr[1];
+      if (RARRAY(nslist)->len == 2) {
+       rprefix = RARRAY(nslist)->ptr[0];
+       ruri = RARRAY(nslist)->ptr[1];
        ruby_xml_xpath_context_register_namespace(xxpc, rprefix, ruri);
       } else {
        rb_raise(rb_eArgError, "nested array must be an array of strings, 
prefix and href/uri");
_______________________________________________
libxml-devel mailing list
libxml-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/libxml-devel

Reply via email to