<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -2,9 +2,9 @@
 
 Autotest.add_hook :run_command do |at|
   if ENV['ONENINE']
-    system &quot;rake1.9 build&quot;
+    system &quot;rake1.9 compile&quot;
   else
-    system &quot;rake build&quot;
+    system &quot;rake compile&quot;
   end
 end
 </diff>
      <filename>.autotest</filename>
    </modified>
    <modified>
      <diff>@@ -49,6 +49,9 @@ static VALUE reparent_node_with(VALUE node_obj, VALUE other_obj, node_other_func
   VALUE reparented_obj ;
   xmlNodePtr node, other, reparented ;
 
+  if(! rb_funcall(node_obj, rb_intern(&quot;is_a?&quot;), 1, cNokogiriXmlNode))
+    rb_raise(rb_eArgError, &quot;node must be a Nokogiri::XML::Node&quot;);
+
   Data_Get_Struct(node_obj, xmlNode, node);
   Data_Get_Struct(other_obj, xmlNode, other);
 </diff>
      <filename>ext/nokogiri/xml_node.c</filename>
    </modified>
    <modified>
      <diff>@@ -22,6 +22,18 @@ module Nokogiri
         assert_equal 'a', desc.name
       end
 
+      def test_add_next_sibling_with_empty_nodeset
+        assert_raises(ArgumentError) {
+          @html.at('a').add_next_sibling(@html.at('head').children)
+        }
+      end
+
+      def test_add_next_sibling_with_non_empty_nodeset
+        assert_raises(ArgumentError) {
+          @html.at('head').add_next_sibling(@html.at('div').children)
+        }
+      end
+
       def test_ancestors_with_selector
         assert node = @html.at('a.bar').child
         assert list = node.ancestors('.baz')</diff>
      <filename>test/html/test_node.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>9dce84f4ddc9e2abde36cd851d1ba26dd6942915</id>
    </parent>
  </parents>
  <author>
    <name>Aaron Patterson</name>
    <email>aaron.patterson@gmail.com</email>
  </author>
  <url>http://github.com/tenderlove/nokogiri/commit/762c8328a21c6b5e839e19c06ae234b6c7682613</url>
  <id>762c8328a21c6b5e839e19c06ae234b6c7682613</id>
  <committed-date>2009-04-29T23:06:32-07:00</committed-date>
  <authored-date>2009-04-29T23:06:32-07:00</authored-date>
  <message>doing a type check on methods that modify the tree. closes #29 closes #20</message>
  <tree>0470c0641f99d27a9d52ac835866345c7aa2fc83</tree>
  <committer>
    <name>Aaron Patterson</name>
    <email>aaron.patterson@gmail.com</email>
  </committer>
</commit>
