Skip to content
Browse files

fix assertions and comments for change to BloomFilter::ConfigurationM…

…ismatch
  • Loading branch information...
1 parent 83ca317 commit 83393b3e2a159ac9ec3a59c5b3f70aa2fafef5cf William Watson committed Apr 27, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/bloomfilter/native.rb
  2. +1 −1 spec/native_spec.rb
View
4 lib/bloomfilter/native.rb
@@ -45,7 +45,7 @@ def set_bits
# Computes the intersection of two Bloom filters.
# It assumes that both filters have the same size -
- # if this is not true +ArgumentError+ is raised.
+ # if this is not true +BloomFilter::ConfigurationMismatch+ is raised.
def &(o)
raise BloomFilter::ConfigurationMismatch.new unless same_parameters?(o)
result = self.class.new
@@ -55,7 +55,7 @@ def &(o)
# Computes the union of two Bloom filters.
# It assumes that both filters have the same size -
- # if this is not true +ArgumentError+ is raised.
+ # if this is not true +BloomFilter::ConfigurationMismatch+ is raised.
def |(o)
raise BloomFilter::ConfigurationMismatch.new unless same_parameters?(o)
result = self.class.new
View
2 spec/native_spec.rb
@@ -103,7 +103,7 @@
bf2 = Native.new(:size => 20)
bf2.insert("test")
- proc {bf1 | bf2}.should raise_error(ArgumentError)
+ proc {bf1 | bf2}.should raise_error(BloomFilter::ConfigurationMismatch)
end
end

0 comments on commit 83393b3

Please sign in to comment.
Something went wrong with that request. Please try again.