Files
news.gitea.happylizard.me/bin/gems/hashery-2.1.2/demo/04_static_hash.rdoc
T
pizza2d1 4cee170d66
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s
Add bin and edit workflow
2026-09-16 13:11:16 -06:00

21 lines
385 B
Plaintext

= StaticHash
A StaticHash is simply a Hash that can only be assigned
once per key. Once assigned a subsequent attempt to assign
a value to the same key will raise an ArgumentError.
h = StaticHash.new
h["x"] = 1
expect ArgumentError do
h["x"] = 2
end
The same error will be raised when using #update or #merge!.
expect ArgumentError do
h.update( "x"=>3 )
end