Minor updates for Ruby 3.x.

FossilOrigin-Name: 792a95e73dbfb858dbbd56b1140c2ddf6bc3afb558e65cc665f30fd6db6833e1
This commit is contained in:
Mahlon E. Smith 2022-08-08 23:02:59 +00:00
parent 3cc4fe1e02
commit 442d19ecb5
4 changed files with 4 additions and 7 deletions

View file

@ -1 +1 @@
2.7
3.1

View file

@ -860,7 +860,7 @@ static VALUE rmdbx_init_copy( VALUE copy, VALUE orig )
void
rmdbx_init_database()
{
rmdbx_cDatabase = rb_define_class_under( rmdbx_mMDBX, "Database", rb_cData );
rmdbx_cDatabase = rb_define_class_under( rmdbx_mMDBX, "Database", rb_cObject );
#ifdef FOR_RDOC
rmdbx_mMDBX = rb_define_module( "MDBX" );

View file

@ -85,7 +85,7 @@ class MDBX::Database
###
### [:no_threadlocal]
### Parallelize read-only transactions across threads. Writes are
### always thread local. (See MDBX documentatoin for details.)
### always thread local. (See MDBX documentation for details.)
###
### [:readonly]
### Reject any write attempts while using this database handle.
@ -364,7 +364,6 @@ class MDBX::Database
protected
#########
### Safely serialize a value, closing any open transaction and re-raising
### if necessary.
###
@ -391,7 +390,6 @@ class MDBX::Database
end
### Yield and return the block, opening a snapshot first if
### there isn't already a transaction in progress. Closes
### the snapshot if this method opened it.

View file

@ -71,8 +71,7 @@ RSpec.describe( MDBX::Database ) do
# here for behavior.
expect {
described_class.open( TEST_DATABASE.to_s )
}.
to raise_exception( MDBX::DatabaseError, /environment is already used/ )
}.to raise_exception( MDBX::DatabaseError, /resource \w+ unavailable/i )
end
end