Skip to content

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)

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.