Don't inadvertantly close an open transaction while using hash convenience methods.
FossilOrigin-Name: 6454408d0a2347681d8030e1788f94904aa69e7502ba695f099d964a638b8d49
This commit is contained in:
parent
6c289674dd
commit
54a9409066
4 changed files with 53 additions and 23 deletions
|
|
@ -312,6 +312,19 @@ RSpec.describe( MDBX::Database ) do
|
|||
end
|
||||
expect( db[ 1 ] ).to be_falsey
|
||||
end
|
||||
|
||||
it "doesn't inadvertantly close transactions when using hash-alike methods" do
|
||||
expect( db.in_transaction? ).to be_falsey
|
||||
db.transaction
|
||||
expect( db.in_transaction? ).to be_truthy
|
||||
db.to_a
|
||||
db.to_h
|
||||
db.keys
|
||||
db.slice( :woop )
|
||||
db.values
|
||||
db.values_at( :woop )
|
||||
expect( db.in_transaction? ).to be_truthy
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue