top | dibdib: Random things | programming: Ruby  /  EDF  /  Palm  /  Perl | obsessions: Games | about: me  /  my pages  /  people

ruby programming

WORM

Tiny module that lets you make hash or array values write-once.

a=[]
a[1]=2 # a[1] is now 2
a[1]=3 # a[1] is now 3
class << a
include WORM
end
a[1]=4 # raises a SecurityError exception