I was wondering what was the reasoning behind freezing the Memoizable return values?
Thanks
I was wondering what was the reasoning behind freezing the Memoizable return values?
Thanks
to protect you from stuff like
foo = bar.memoized_method foo.gsub!(...) #do something with foo
If you did this and foo wasn't frozen then you'd alter what memoized_method returned for all future calls - probably not what was intended
Fred
Makes sense. Thanks.