lib/btrieve/btrieve_session.rb in beezwax-0.1.1 vs lib/btrieve/btrieve_session.rb in beezwax-0.1.2
- old
+ new
@@ -12,11 +12,10 @@
end
end
def self.get_session
SESSIONS[Thread.current]
-
end
def transaction(&block)
btr_op(self, BEGIN_TRANSACTION, NULL_BUFFER, NULL_BUFFER, NULL_BUFFER, NULL_KEY)
begin
@@ -35,16 +34,18 @@
end
private
def initialize(pathname)
+ before_wd=Dir.pwd
@cache = {}
@model_classes = {}
@table_cache = {}
@pathname = pathname
@client_id = "#{0.chr*12}#{[0x5257].pack('S')}#{rand(65535)}"
btr_op(self, SET_DIRECTORY, NULL_BUFFER, NULL_BUFFER, @pathname, NULL_KEY)
@btrieve_schema = BtrieveSchema.new(self)
@btrieve_meta = BtrieveMeta.new(self)
+ Dir.chdir(before_wd)
end
end