Permalink
Browse files

fixed issue with opening dbs and REE

  • Loading branch information...
1 parent 1836912 commit cf43603f0b033c83c5c1a862fff20632d9686c63 @jmettraux committed Oct 30, 2009
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/rufus/tokyo/cabinet/abstract.rb
  2. +1 −1 lib/rufus/tokyo/tyrant/abstract.rb
  3. +1 −1 lib/rufus/tokyo/tyrant/table.rb
View
2 lib/rufus/tokyo/cabinet/abstract.rb
@@ -217,7 +217,7 @@ def initialize (name, params={})
name = name + params.collect { |k, v| "##{k}=#{v}" }.join('')
- (lib.tcadbopen(@db, name) == 1) || raise(
+ (lib.tcadbopen(@db, name) != 0) || raise(
TokyoError.new("failed to open/create db '#{name}' #{params.inspect}"))
#
View
2 lib/rufus/tokyo/tyrant/abstract.rb
@@ -97,7 +97,7 @@ def initialize (host, port=0, params={})
@host = host
@port = port
- (lib.tcrdbopen(@db, host, port) == 1) || raise(
+ (lib.tcrdbopen(@db, host, port) != 0) || raise(
TokyoError.new("couldn't connect to tyrant at #{host}:#{port}"))
if self.stat['type'] == 'table'
View
2 lib/rufus/tokyo/tyrant/table.rb
@@ -83,7 +83,7 @@ def initialize (host, port=0)
@host = host
@port = port
- (lib.tcrdbopen(@db, host, port) == 1) ||
+ (lib.tcrdbopen(@db, host, port) != 0) ||
raise(TokyoError.new("couldn't connect to tyrant at #{host}:#{port}"))
if self.stat['type'] != 'table'

0 comments on commit cf43603

Please sign in to comment.