4

That was a very surprising finding when I switched my app to Ruby3+ version.

Even though it is a major version upgrade but still..

Removal of Core data type from stdlib that's been there for at least 10 years(since 1.9.3?) looks weird.

Was there any compelling reason I'm not aware of?

The error that it raises:

"The SortedSet class has been extracted from the set library. You must use the sorted_set gem or other alternatives."

BinaryButterfly
  • 18,137
  • 13
  • 50
  • 91

1 Answers1

5

After a bit of searching I found the following:

Remove SortedSet implementations PR

It required RBTree to perform decently and the external dependency was not suitable for a standard library. The pure ruby fallback implementation was originally meant to be a demonstration of how to write a subclass of Set, and its poor performance was not suitable for use in production.

I decided it should be distributed as an external library instead of bundling it with Set.


To keep it short:

SortedSet has been removed for dependency and performance reasons.

source

BinaryButterfly
  • 18,137
  • 13
  • 50
  • 91