Permalink
Browse files

fixing up rdoc and adding an rdoc test

  • Loading branch information...
1 parent 9a37bcd commit c6cea3ce0e10343405ba16af72c779cd879c3f67 @tenderlove tenderlove committed Dec 1, 2008
Showing with 21 additions and 1 deletion.
  1. +8 −0 Rakefile
  2. +4 −0 ext/nokogiri/xml_syntax_error.c
  3. +9 −1 ext/nokogiri/xml_text.c
View
@@ -279,6 +279,14 @@ namespace :test do
ENV['NOKOGIRI_GC'] = "true"
Rake::Task["test"].invoke
end
+
+ desc "find call-seq in the rdoc"
+ task :rdoc => 'docs' do
+ Dir['doc/**/*.html'].each { |docfile|
+ next if docfile =~ /\.src/
+ puts "FAIL: #{docfile}" if File.read(docfile) =~ /call-seq/
+ }
+ end
end
namespace :install do
@@ -178,6 +178,10 @@ void init_xml_syntax_error()
{
VALUE nokogiri = rb_define_module("Nokogiri");
VALUE xml = rb_define_module_under(nokogiri, "XML");
+
+ /*
+ * The XML::SyntaxError is raised on parse errors
+ */
VALUE klass = rb_define_class_under(xml, "SyntaxError", rb_eSyntaxError);
cNokogiriXmlSyntaxError = klass;
View
@@ -18,7 +18,15 @@ static VALUE new(VALUE klass, VALUE string, VALUE document)
VALUE cNokogiriXmlText ;
void init_xml_text()
{
- VALUE klass = cNokogiriXmlText = rb_const_get(mNokogiriXml, rb_intern("Text"));
+ VALUE nokogiri = rb_define_module("Nokogiri");
+ VALUE xml = rb_define_module_under(nokogiri, "XML");
+
+ /*
+ * Wraps Text nodes.
+ */
+ VALUE klass = rb_define_class_under(xml, "Text", cNokogiriXmlNode);
+
+ cNokogiriXmlText = klass;
rb_define_singleton_method(klass, "new", new, 2);
}

0 comments on commit c6cea3c

Please sign in to comment.