End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
PStore#commit
commit
lib/pstore.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/pstore.rb, line 264
def commit
in_transaction
@abort = false
throw :pstore_abort_transaction
end
Ends the current PStore#transaction, committing any changes to the data store immediately.
Example:
Example
require "pstore" store = PStore.new("data_file.pstore") store.transaction do # begin transaction # load some data into the store... store[:one] = 1 store[:two] = 2 store.commit # end transaction here, committing changes store[:three] = 3 # this change is never reached end
WARNING: This method is only valid in a PStore#transaction. It will raise PStore::Error if called at any other time.