Change XmlNodeSet#to_a return type to RubyArray #1969
The existing signature conflicts with one added to JRuby 9.2.9.
We would prefer to keep the specific return type in JRuby.
I do not believe the change in 9.2.9 breaks anything at runtime,
The existing signature conflicts with one added to JRuby 9.2.9. Specifically, the new signature in JRuby returns RubyArray, which causes a compilation error on this line in Nokogiri because it attempts to use a more general return type. We would prefer to keep the specific return type in JRuby. * If we patch JRuby, then 9.2.9 will never be able to compile any version of Nokogiri. * If we patch Nokogiri, all versions of JRuby can compile current and future Nokogiri. Versions prior to 9.2.9 will be able to compile all existing releases of Nokogiri. I do not believe the change in 9.2.9 breaks anything at runtime, since the JVM does not care about this particular return type mismatch unless someone actually returns a non-RubyArray object. Fixes #1968
@headius I see you based this commit on the
I'm not totally familiar with the JRuby 9.2.9 change that is driving this commit, but am I to understand that you're requesting a bug fix release in the v1.10.x series?
@flavorjones In JRuby 9.2.8, the only
So the addition of the new
This fix should go into any active Nokogiri branches going forward. I did not do the PR against master because it appear to be behind the branch.