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#[]=

[]=(key, value)

Creates or replaces the value for the given key:

Example
example_store do |store|
  temp.transaction do
    temp[:bat] = 3
  end
end

See also Hierarchical Values.

Raises an exception if called outside a transaction block.

See also #[] #abort .new #commit also in 3.4 · 3.3 · 3.1 · 3.0