Skip to content

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

instance method

PStore#delete

(K name) -> V?
delete(key)

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.