Nokogiri v1.13.8 Release Notes

Release Date: 2022-07-23 // 2 months ago
  • ๐Ÿ—„ Deprecated

    • ๐Ÿšš XML::Reader#attribute_nodes is deprecated due to incompatibility between libxml2's xmlReader memory semantics and Ruby's garbage collector. Although this method continues to exist for backwards compatibility, it is unsafe to call and may segfault. This method will be removed in a future version of Nokogiri, and callers should use #attribute_hash instead. [#2598]

    ๐Ÿ‘Œ Improvements

    • XML::Reader#attribute_hash is a new method to safely retrieve the attributes of a node from XML::Reader. [#2598, #2599]

    ๐Ÿ›  Fixed

    • ๐Ÿ’Ž [CRuby] Calling XML::Reader#attributes is now safe to call. In Nokogiri <= 1.13.7 this method may segfault. [#2598, #2599]

Previous changes from v1.13.7

  • ๐Ÿ›  Fixed

    โšก๏ธ XML::Node objects, when compacted, update their internal struct's reference to the Ruby object wrapper. Previously, with GC compaction enabled, a segmentation fault was possible after compaction was triggered. [#2578] (Thanks, @eightbitraptor!)