rufus-tokyo 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.txt CHANGED
@@ -2,6 +2,11 @@
2
2
  = rufus-tokyo CHANGELOG.txt
3
3
 
4
4
 
5
+ == rufus-tokyo - 1.0.6 released 2010/02/01
6
+
7
+ - gh #29 : segfault when getdup(unknown_key). Fixed, thanks Dmitry
8
+
9
+
5
10
  == rufus-tokyo - 1.0.5 released 2010/01/06
6
11
 
7
12
  - todo : now using getconf to determine INT_MIN (thanks oklahoma_mixer)
data/CREDITS.txt CHANGED
@@ -12,6 +12,7 @@ Jeremy Hinegardner http://www.copiousfreetime.org/
12
12
 
13
13
  == contributors
14
14
 
15
+ Arun Thampi http://github.com/arunthampi
15
16
  Pietro Ferrari http://github.com/pietroferrari
16
17
  Kenneth Kalmer http://www.opensourcery.co.za/
17
18
  Adam Keys http://github.com/therealadam
@@ -25,7 +26,8 @@ Mark 'mebaran' http://github.com/mebaran
25
26
 
26
27
  == feedback / support
27
28
 
28
- Aaron Zheng free/tcfree issue
29
+ Dmitry A. Ustalov http://github.com/eveel
30
+ Aaron Zhang free/tcfree issue
29
31
  Swerling http://github.com/swerling
30
32
  Alexandre Gravem
31
33
  Philippe Monnet http://blog.monnet-usa.com/
@@ -562,7 +562,6 @@ module Rufus::Tokyo
562
562
  def get4 (k)
563
563
 
564
564
  l = lib.tcbdbget4(as_btree, k, Rufus::Tokyo.blen(k))
565
-
566
565
  Rufus::Tokyo::List.new(l).release
567
566
  end
568
567
  alias :getdup :get4
@@ -374,7 +374,7 @@ module Rufus::Tokyo
374
374
  #
375
375
  def to_a
376
376
 
377
- self.collect { |e| e }
377
+ @pointer.address.zero? ? nil : self.collect { |e| e }
378
378
  end
379
379
 
380
380
  # Closes (frees) this list
@@ -392,6 +392,8 @@ module Rufus::Tokyo
392
392
  #
393
393
  def self.free (list_pointer)
394
394
 
395
+ return if list_pointer.address.zero?
396
+
395
397
  CabinetLib.tclistdel(list_pointer)
396
398
  end
397
399
 
@@ -26,7 +26,7 @@
26
26
  module Rufus
27
27
  module Tokyo
28
28
 
29
- VERSION = '1.0.5'
29
+ VERSION = '1.0.6'
30
30
  end
31
31
  end
32
32
 
data/rufus-tokyo.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rufus-tokyo}
8
- s.version = "1.0.5"
8
+ s.version = "1.0.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["John Mettraux", "Zev Blut", "Jeremy Hinegardner", "James Edward Gray II"]
12
- s.date = %q{2010-01-06}
12
+ s.date = %q{2010-02-01}
13
13
  s.description = %q{
14
14
  Ruby-ffi based lib to access Tokyo Cabinet and Tyrant.
15
15
 
@@ -32,6 +32,11 @@ describe 'Rufus::Tokyo::Cabinet .tcb' do
32
32
  @db.getdup('a').should.equal([ 'a0', 'a1' ])
33
33
  end
34
34
 
35
+ it 'should return nul when getdupping a missing key' do
36
+
37
+ @db.getdup('b').should.equal(nil)
38
+ end
39
+
35
40
  it 'should be able to fetch keys for duplicate values' do
36
41
  [ %w[John Hornbeck],
37
42
  %w[Tim Gourley],
@@ -38,6 +38,11 @@ if defined?(TokyoCabinet)
38
38
  @db.getdup('a').should.equal([ 'a0', 'a1' ])
39
39
  end
40
40
 
41
+ it 'should return nul when getdupping a missing key' do
42
+
43
+ @db.getdup('b').should.equal(nil)
44
+ end
45
+
41
46
  it 'should be able to fetch keys for duplicate values' do
42
47
  [ %w[John Hornbeck],
43
48
  %w[Tim Gourley],
@@ -48,7 +48,7 @@ if defined?(TokyoCabinet)
48
48
 
49
49
  it 'should create its underlying file' do
50
50
 
51
- File.exist?('tmp/cabinet_spec.tch').should.equal(true)
51
+ File.exist?('tmp/edo_cabinet_spec.tch').should.equal(true)
52
52
  end
53
53
  end
54
54
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rufus-tokyo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Mettraux
@@ -12,7 +12,7 @@ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
14
 
15
- date: 2010-01-06 00:00:00 +09:00
15
+ date: 2010-02-01 00:00:00 +09:00
16
16
  default_executable:
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency