Stateful: Keep state with #dup
This commit is contained in:
parent
70a1dfe2c4
commit
0b966714b6
@ -105,6 +105,12 @@ module Crypto::Secret
|
|||||||
@state = State::Wiped
|
@state = State::Wiped
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def dup
|
||||||
|
super.tap do |obj|
|
||||||
|
obj.set_state @state
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
protected abstract def readwrite_impl : Nil
|
protected abstract def readwrite_impl : Nil
|
||||||
protected abstract def readonly_impl : Nil
|
protected abstract def readonly_impl : Nil
|
||||||
protected abstract def noaccess_impl : Nil
|
protected abstract def noaccess_impl : Nil
|
||||||
|
Loading…
Reference in New Issue
Block a user