diff --git a/lib/truffle/truffle/patches/nokogiri_patches.rb b/lib/truffle/truffle/patches/nokogiri_patches.rb index 4f2cfd5efd14..743e6d6cb0b0 100644 --- a/lib/truffle/truffle/patches/nokogiri_patches.rb +++ b/lib/truffle/truffle/patches/nokogiri_patches.rb @@ -79,6 +79,11 @@ def self.using_system_libraries? replacement: "VALUE thing = Qnil;\nVALUE errors = rb_ary_new();", predicate: -> { using_system_libraries? } }, + { + match: 'VALUE retVal = Qnil;', + replacement: "VALUE retVal = Qnil;\nVALUE errors = rb_ary_new();", + predicate: -> { using_system_libraries? } + }, { match: 'xmlSetStructuredErrorFunc(NULL, Nokogiri_error_raise);', replacement: 'xmlSetStructuredErrorFunc(errors, Nokogiri_error_array_pusher);',