https://github.com/knu/sorted_set
SortedSet for Ruby
https://github.com/knu/sorted_set
Last synced: about 16 hours ago
JSON representation
Repository metadata
SortedSet for Ruby
- Host: GitHub
- URL: https://github.com/knu/sorted_set
- Owner: knu
- License: bsd-2-clause
- Created: 2020-12-22T07:02:40.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-24T06:49:13.000Z (about 2 years ago)
- Last Synced: 2026-03-01T06:31:50.669Z (3 days ago)
- Language: Ruby
- Homepage:
- Size: 14.6 KB
- Stars: 20
- Watchers: 1
- Forks: 11
- Open Issues: 13
- Releases: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
README.md
SortedSet
SortedSet implements a Set whose elements are sorted in ascending
order (according to the return values of their <=> methods) when
iterating over them.
Every element in SortedSet must be mutually comparable to every
other: comparison with <=> must not return nil for any pair of
elements. Otherwise ArgumentError will be raised.
Currently this library does nothing for JRuby, as it has its own
version of Set and SortedSet.
Installation
Add this line to your application's Gemfile:
gem 'sorted_set'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install sorted_set
Usage
require "sorted_set"
set = SortedSet.new([2, 1, 5, 6, 4, 5, 3, 3, 3])
ary = []
set.each do |obj|
ary << obj
end
p ary # => [1, 2, 3, 4, 5, 6]
set2 = SortedSet.new([1, 2, "3"])
set2.each { |obj| } # => raises ArgumentError: comparison of Fixnum with String failed
Development
After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/knu/sorted_set.
License
The gem is available as open source under either the terms of the 2-Clause BSD License.
Owner metadata
- Name: Akinori Musha
- Login: knu
- Email: knu@idaemons.org
- Kind: user
- Description: @Ruby committer, co-maintainer of @huginn, Emacs Lisper, ex-FreeBSD committer. CTO of @WEDInc.
- Website:
- Location: Tokyo, Japan
- Twitter: knu
- Company:
- Icon url: https://avatars.githubusercontent.com/u/10236?v=4
- Repositories: 213
- Last ynced at: 2026-02-17T23:18:12.054Z
- Profile URL: https://github.com/knu
GitHub Events
Total
- Pull request event: 1
- Fork event: 1
- Issues event: 1
- Watch event: 3
- Issue comment event: 4
Last Year
- Watch event: 2
- Issue comment event: 4
Committers metadata
Last synced: 1 day ago
Total Commits: 16
Total Committers: 1
Avg Commits per committer: 16.0
Development Distribution Score (DDS): 0.0
Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0
| Name | Commits | |
|---|---|---|
| Akinori MUSHA | k****u@i****g | 16 |
Committer domains:
- idaemons.org: 1
Issue and Pull Request metadata
Last synced: 14 days ago
Total issues: 10
Total pull requests: 7
Average time to close issues: 7 months
Average time to close pull requests: 3 days
Total issue authors: 8
Total pull request authors: 6
Average comments per issue: 3.3
Average comments per pull request: 0.71
Merged pull request: 0
Bot issues: 0
Bot pull requests: 0
Past year issues: 1
Past year pull requests: 1
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 1
Past year pull request authors: 1
Past year average comments per issue: 0.0
Past year average comments per pull request: 0.0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- jaynetics (3)
- ywchang (1)
- headius (1)
- themilkman (1)
- lilijreey (1)
- vladimirtemnikov (1)
- NichiyaOba (1)
- kimyu92 (1)
Top Pull Request Authors
- meineerde (2)
- pmcnano (1)
- CariWest (1)
- koic (1)
- bf4 (1)
- arich (1)
Top Issue Labels
Top Pull Request Labels
Package metadata
- Total packages: 11
-
Total downloads:
- rubygems: 106,638,678 total
- Total docker downloads: 872,159,062
- Total dependent packages: 29 (may contain duplicates)
- Total dependent repositories: 991 (may contain duplicates)
- Total versions: 28
- Total maintainers: 1
gem.coop: sorted_set
Implements a variant of Set whose elements are sorted in ascending order
- Homepage: https://github.com/knu/sorted_set
- Documentation: http://www.rubydoc.info/gems/sorted_set/
- Licenses: BSD-2-Clause
- Latest release: 1.0.3 (published about 5 years ago)
- Last Synced: 2026-03-03T04:32:14.191Z (about 22 hours ago)
- Versions: 8
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 53,381,145 Total
- Docker Downloads: 436,079,531
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 0.195%
- Docker downloads count: 0.277%
- Downloads: 0.502%
- Maintainers (1)
rubygems.org: sorted_set
Implements a variant of Set whose elements are sorted in ascending order
- Homepage: https://github.com/knu/sorted_set
- Documentation: http://www.rubydoc.info/gems/sorted_set/
- Licenses: BSD-2-Clause
- Latest release: 1.0.3 (published about 5 years ago)
- Last Synced: 2026-02-27T09:02:23.332Z (5 days ago)
- Versions: 8
- Dependent Packages: 29
- Dependent Repositories: 991
- Downloads: 53,257,533 Total
- Docker Downloads: 436,079,531
-
Rankings:
- Docker downloads count: 0.341%
- Downloads: 0.56%
- Dependent packages count: 0.927%
- Dependent repos count: 1.039%
- Average: 4.281%
- Forks count: 9.657%
- Stargazers count: 13.165%
- Maintainers (1)
proxy.golang.org: github.com/knu/sorted_set
- Homepage:
- Documentation: https://pkg.go.dev/github.com/knu/sorted_set#section-documentation
- Licenses: bsd-2-clause
- Latest release: v1.0.3 (published about 5 years ago)
- Last Synced: 2026-02-27T09:02:25.501Z (5 days ago)
- Versions: 4
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Forks count: 7.061%
- Stargazers count: 8.663%
- Average: 9.025%
- Dependent packages count: 9.576%
- Dependent repos count: 10.802%
guix: ruby-sorted-set
Ruby Set variant whose elements are sorted in ascending order
- Homepage: https://github.com/knu/sorted_set
- Documentation: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/ruby-xyz.scm#n469
- Licenses: bsd-2
- Latest release: 1.0.3 (published 1 day ago)
- Last Synced: 2026-03-02T18:58:38.425Z (1 day ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-12: ruby-sorted-set
- Homepage: https://github.com/knu/sorted_set
- Documentation: https://packages.debian.org/bookworm/ruby-sorted-set
- Licenses:
- Latest release: 1.0.3-3 (published 19 days ago)
- Last Synced: 2026-02-12T23:42:05.423Z (19 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
debian-13: ruby-sorted-set
- Homepage: https://github.com/knu/sorted_set
- Documentation: https://packages.debian.org/trixie/ruby-sorted-set
- Licenses:
- Latest release: 1.0.3-3 (published 20 days ago)
- Last Synced: 2026-02-13T13:20:01.479Z (19 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
Dependencies
- rake ~> 12.0
- test-unit >= 0
- rbtree >= 0
- set ~> 1.0
- actions/checkout master composite
- ruby/setup-ruby v1 composite
Score: 24.198344575436973