From e3a18fa0f7106e489d584d96cc99333c24451c89 Mon Sep 17 00:00:00 2001 From: Denis Knauf Date: Mon, 22 Feb 2010 16:17:25 +0100 Subject: [PATCH] Recno/Queue#push --- lib/sbdb/db.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/sbdb/db.rb b/lib/sbdb/db.rb index 2d82c8f..6aed277 100644 --- a/lib/sbdb/db.rb +++ b/lib/sbdb/db.rb @@ -108,6 +108,10 @@ module SBDB def []= k, v super [k].pack('I'), v end + + def push v + put nil, nil, v, Bdb::DB_APPEND + end end Array = Recno TYPES[DB::RECNO] = Recno @@ -128,6 +132,10 @@ module SBDB def unshift get nil, nil, nil, Bdb::DB_CONSUME end + + def push v + put nil, nil, v, Bdb::DB_APPEND + end end TYPES[DB::QUEUE] = Queue end