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

Basic functionality does not work (on 1.9.2), on 64-bit machine #2

Closed
mdemare opened this issue Feb 25, 2011 · 1 comment
Closed

Basic functionality does not work (on 1.9.2), on 64-bit machine #2

mdemare opened this issue Feb 25, 2011 · 1 comment

Comments

@mdemare
Copy link

mdemare commented Feb 25, 2011

b = Bitset.new(16000)
[5343, 15661, 1500, 6225].each {|i| b[i] = true }
b.to_s.count("1") # => 8 (instead of 4)
b.cardinality # => 36 (instead of 4)
(0...16000).select{|x| b[x]} # => [1500, 1532, 5343, 5375, 6225, 6257, 15629, 15661]

@tyler
Copy link
Owner

tyler commented Feb 26, 2011

brendon9x graciously fixed this bug here: 8efca8f

New release forthcoming.

This issue was closed.
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

No branches or pull requests

2 participants