Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop dependency on SortedSet #154

Merged
merged 1 commit into from Dec 15, 2020

Conversation

casperisfine
Copy link

Alternative to #153

Regular Set, since they are backed by a Hash, keep the insertion order. From what I gathered the palette is built once, but is not mutated (I mean not added to, it has some internal mutation).

Based on this, I believe that we can initialize a Set with a sorted array, which should give us the same result than a SortedSet.

cc @wvanbergen @tenderlove @jeremy

@@ -7,10 +7,6 @@ platforms :jruby do
gem "jruby-openssl"
end

platform :rbx do
gem "rubysl"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was causing issues on CI.

@decoding_map = decoding_map if decoding_map
@encoding_map = {}
freeze
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I freeze the palette to validate my assumption that elements are not added to the set.

@tenderlove
Copy link

LGTM! I'll close my PR because I like this one better.

@wvanbergen wvanbergen merged commit 074eae4 into wvanbergen:master Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants