For cached databases: clone the requested value to avoid problems.
This commit is contained in:
parent
351df7426f
commit
b4460e59fa
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ class DODB::CachedDataBase(V) < DODB::Storage(V)
|
|||
return nil
|
||||
end
|
||||
def [](key : Int32) : V
|
||||
@data[key] rescue raise MissingEntry.new(key)
|
||||
@data[key].clone rescue raise MissingEntry.new(key)
|
||||
end
|
||||
|
||||
def []=(index : Int32, value : V)
|
||||
|
|
Loading…
Add table
Reference in a new issue