work towards having
had these changes lying around for a long-time (mostly waiting to target 9.2)
but there's also a significant gain in performance.
for maximum compatibility sets are backed by a
some (naive) performance numbers, also showcasing
also to be noted that due use of Sets in Rails this has a noticeable impact on a decently sized Rails app.
UPDATE: compared to 9.1.12 its still seems to be a consistent 5% improvement using this branch ...
... with auto (magic) toJava conversions (like RubyArray does)
... wouldn't care really but this is spec-ed by RubySpecs
(and raises an ArgumentError with a more useful message)
... relaxed the respond_to?(:<=>) expectation as it seems less important
... necessary since we use some Java internal structures its been implemented in Java, could have been done with _load/_dump although would require exposing some of the Set/SortedSet internals
... and thus MRI's (pure Ruby) set.rb implementation as well important with Rails using Sprockets at its marshalling Set instances