Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

PStore#transaction

[U] (?bool read_only) { (self) -> U } -> U
transaction(read_only = false) { |pstore| ... }

Opens a transaction block for the store. See Transactions.

With argument read_only as false, the block may both read from and write to the store.

With argument read_only as true, the block may not include calls to transaction, []=, or delete.

Raises an exception if called within a transaction block.