Set a reference to the node in XML::SyntaxError #872

Closed
wants to merge 48 commits into from

9 participants

@phorque

The struct _xmlError of libxml2 holds a pointer to the node that caused the syntax error, this patch set a new attribute 'node' in XML::SyntaxError with a reference to this node.

@flavorjones
Sparkle Motion member

Hello!

Thanks for submitting this pull request. However, we require tests for any new features. Can you write two tests for this: one with the @node set, and one without it set?

Thanks!

@phorque

Hello!

I'm not sure about all the conditions that make libxml2 set the pointer to an invalid 'node', however those two tests cover my use case.

dbussink and others added some commits Mar 26, 2013
@dbussink dbussink Use a rb_ary_entry and not RARRAY_PTR()
For MRI, this doesn't make a difference, but on Rubinius this prevents
having to setup a backing store for copying over the internal array
pointers. This was the only case where RARRAY_PTR was used, other places
already use rb_ary_entry, so it should be a good change for consistency
as well.
5a20643
@kyanny kyanny Add Japanese Changelog for 1.5.7, 1.5.8 and 1.5.9 7a3c51c
@flavorjones flavorjones Using mini_portile to compile libxml2 and libxslt on any (non-windows…
…) platform.
65206fd
@kyanny kyanny Fix translation of `reparent` 2b6b28a
@flavorjones flavorjones dependencies.yml is now the central location for library dependencies.
Note that this is for both windows cross-compile and packaged dependencies.
ed6ca12
@flavorjones flavorjones Upgrading libxml2 dependency from 2.7.7 to 2.7.8.
Affects only windows users at this time.
3ff4a34
@flavorjones flavorjones mini_portile is a gem dependency if we're building libxml2. afacaee
@flavorjones flavorjones If we're building libxml2, include the tarballs in the gem manifest. 589d77f
@flavorjones flavorjones Upgrade mini_portile to support FTP, and removing my FTP-support hacks. 1834569
@flavorjones flavorjones Compile libxml2 with the --with-threads option. 51e6d2a
@flavorjones flavorjones Setting fat-source dependency on libxml 2.8.0. 4bbdac7
@flavorjones flavorjones Making fat-source libraries the default, unless NOKOGIRI_USE_SYSTEM_L…
…IBRARIES is set.
99f0556
@flavorjones flavorjones VERSION_INFO["libxml"]["source"] now indicates whether libxml2 comes …
…from "system" or "packaged" libraries.
a0209a1
@flavorjones flavorjones Version bump to 1.6.0.rc1 and CHANGELOG updates. 62d6316
@flavorjones flavorjones Fixing cross-compilation for Windows, and cleaning up extconf.rb bd48e38
@flavorjones flavorjones Deprecating Ruby 1.8. ab09536
@flavorjones flavorjones mini_portile is now a runtime dependency 80e1e98
@flavorjones flavorjones Package libxml2 and libxslt tarballs unless we're building windows or…
… jruby gems.
7ea96e4
@flavorjones flavorjones VERSION_INFO now displays paths to libxml2 and libxslt if using the p…
…ackaged libraries.
0e91da7
@flavorjones flavorjones CHANGELOGs updated 65b0c13
@knu knu Use const_get() instead of eval(). 22cd9e4
@knu knu Use the case-when construct. 790ac61
@knu knu Make trivial micro-optimization. 263c9a2
@knu knu Add a deprecation note. 4766624
@knu knu Translate to Japanese. ed343b4
@knu knu Add a JRuby tag. d3c20a0
@knu knu Translate dates and headings to Japanese. 912610d
@knu knu Translate some of the untranslated items. ed7864d
@knu knu Use the Japanese word for "namespace". db27d81
@knu knu Translate some more of the rest. ac7dc15
@knu knu Revert. This was work in progress and not meant to be pushed. Sorry. abc65ba
@jvshahid jvshahid Don't throw an exception on empty string io on JRuby. Fix #883. 33850c3
@jvshahid jvshahid update the changelog. 6b9b694
@boutil boutil tests: exchange regexp and string with assert_match
MiniTest gem raises a TypeError
 TypeError: can't convert Regexp to String
when in assert_match the first argument is a string and the second a
regular expression, as the first argument is always converted to RegExp.
494d0d2
@dbussink dbussink Use explicit variable name in extconf.rb
_ indicates that this variable should be ignored. Since this variable is actually used, use a proper name instead.

Rubinius in 1.9 mode has some issues with _ handling (since the semantics changed from 1.8 -> 1.9) and this prevents this issues.
73b929c
@leejarvis leejarvis Update Manifest.txt to include all files
closes #896
cefa247
@leejarvis leejarvis Add docs for XMLParser::Nokogiri#{start,end}_element_namespace 6e223d3
@leejarvis leejarvis Support running tests on Minitest version 5 5bfb08b
@leejarvis leejarvis updated CHANGELOG for merged pull requests 4b660c1
Patrick Cheng Fixed issue found while try to troubleshoot ruby-saml with jruby
when XSD has DOCTYPE to DTD, not able to load the file.

and the ruby script is run without path, NullPointerException got thrown.

Test to demostrate sparklemotion#791
a78d1e6
@leejarvis leejarvis Pre 1.9 support has been deprecated, lets remove these from travis.yml 4455dcf
@flavorjones flavorjones Update ROADMAP.md b47cc37
@ender672 ender672 Fix segfault when there is no default subelement for an HTML node.
Fixes #917
c3ecc20
@flavorjones flavorjones CHANGELOG updates to reflect 1.5.10 7604e10
@flavorjones flavorjones Updated Manifest. 523a68c
@flavorjones flavorjones Version bump to 1.6.0. c12b0e8
@phorque phorque closed this Jun 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment