Closed whirsch-pubfactory closed 3 years ago
Thanks for reporting. I will look into it in the next couple of days. In the meantime, if you tell me what you're trying to do I may be able to suggest a workaround.
Note that the JRuby implementation does the right thing by raising an exception; we need to do the same in the CRuby implementation. Alternatively, we should have a Ruby wrapper for the extension implementation that does this type check consistently across both. Targetting v1.11.0.
Sorry for the delay, this will be fixed in the next release (see #2210).
Describe the bug
I was playing around with nokogiri, and managed to segfault it by assigning
DocumentFragment.children
toDocument.root
, rather thanDocumentFragment.children[0]
To Reproduce
Expected behavior
It should fail with an argument error like all other types passed into it do.
Environment
Additional context
In the unlikely event it matters, I'm running through
rbenv exec bundle exec ruby segfault.rb