Actions
Bug #10113
closedRuby memoization behaving oddly when using hash keys with spaces
Description
Trying to use simple Hash memoization with a ruby hash in a class method, it "fails" when having spaces as the hash key. Example code is attached.
When calling the memoization method, it fails to maintain the instance variable. It resets the variable every time the method is called.
When not having spaces in the key of the Hash, it works as it should, memoizing the variable.
P.S. Despite my ruby version indicated bellow, it fails in the newest as well.
Files
Actions
Like0
Like0Like0Like0