sumbur 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/ext/sumbur/sumbur.c CHANGED
@@ -61,7 +61,7 @@ void
61
61
  Init_native_sumbur()
62
62
  {
63
63
  VALUE mod_sumbur = rb_define_module("Sumbur");
64
- VALUE mod_native = rb_define_module_under(mod_sumbur, "Native");
64
+ VALUE mod_native = rb_define_module_under(mod_sumbur, "NativeSumbur");
65
65
 
66
66
  rb_define_method(mod_native, "sumbur", rb_sumbur, 2);
67
67
  rb_extend_object(mod_native, mod_native);
data/lib/sumbur.rb CHANGED
@@ -3,8 +3,8 @@ require "sumbur/version"
3
3
  module Sumbur
4
4
  begin
5
5
  require 'sumbur/native_sumbur'
6
- include Native
7
- extend Native
6
+ include NativeSumbur
7
+ extend NativeSumbur
8
8
  rescue LoadError
9
9
  require 'sumbur/pure_ruby'
10
10
  include PureRuby
@@ -9,7 +9,7 @@ module Sumbur
9
9
  l = 0xFFFFFFFF
10
10
  part = l / cluster_capacity
11
11
 
12
- return 0 if l - hashed_integer < part
12
+ return 0 if l - hashed_integer <= part
13
13
 
14
14
  h = hashed_integer
15
15
  n = 1
@@ -1,3 +1,3 @@
1
1
  module Sumbur
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/test/test_sumbur.rb CHANGED
@@ -53,12 +53,12 @@ begin
53
53
  require 'sumbur/native_sumbur'
54
54
 
55
55
  describe "Native" do
56
- let(:sumbur) { Sumbur::Native }
56
+ let(:sumbur) { Sumbur::NativeSumbur }
57
57
  class_exec &shared_example
58
58
 
59
59
  it "should produce same spread as pure ruby version" do
60
60
  for capa in [2,3,4,7,8,9,17,18,19]
61
- spread(1_000_000, capa, Sumbur::Native).must_equal spread(1_000_000, capa, Sumbur::PureRuby)
61
+ spread(1_000_000, capa, Sumbur::NativeSumbur).must_equal spread(1_000_000, capa, Sumbur::PureRuby)
62
62
  end
63
63
  end
64
64
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sumbur
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-08-02 00:00:00.000000000 Z
13
+ date: 2012-08-03 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: Sumbur - consistent spreading
16
16
  email:
@@ -54,3 +54,4 @@ specification_version: 3
54
54
  summary: Sumbur - consistent spreading
55
55
  test_files:
56
56
  - test/test_sumbur.rb
57
+ has_rdoc: