End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
PStore#delete
delete(key)
lib/pstore.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/pstore.rb, line 476
def delete(key)
in_transaction_wr
@table.delete key
end
Removes and returns the value at key if it exists:
Example
example_store do |store| store.transaction do store[:bat] = 3 store.delete(:bat) end end
Returns nil if there is no such key.
Raises an exception if called outside a transaction block.