Module: Nokogiri::Test
- Defined in:
- ext/nokogiri/test_global_handlers.c,
ext/nokogiri/test_global_handlers.c
Overview
The Nokogiri::Test module should only be used for testing Nokogiri. Do NOT use this outside of the Nokogiri test suite.
Class Method Summary collapse
-
.__foreign_error_handler { ... } ⇒ nil
Override libxml2’s global error handlers to call the block.
Class Method Details
.__foreign_error_handler { ... } ⇒ nil
Override libxml2’s global error handlers to call the block. This method thus has very little value except to test that Nokogiri is properly setting error handlers elsewhere in the code. See test/helper.rb for how this is being used.
19 20 21 22 23 24 25 26 |
# File 'ext/nokogiri/test_global_handlers.c', line 19
static VALUE
rb_foreign_error_handler(VALUE klass)
{
rb_need_block();
foreign_error_handler_block = rb_block_proc();
xmlSetStructuredErrorFunc(NULL, foreign_error_handler);
return Qnil;
}
|