Actions
Bug #20442
closedPrinting class variable inconsistent when using nested hashes
Description
See attached test.rb. I have a class with a class variable. The idea is simple, increment the value and then print out the resulting class var.
Mock1
0
1
Mock2
{}
{"a"=>1}
Mock3
{}
{"a"=>1}
Mock4
{}
{}
Mock1 through Mock3 are working as expected. But Mock4 does not, it outputs a blank hash, rather than the expected: {"a"=>{"a"=>1}}
The value is being set. If I replace the print method with @val['a']['a']
is outputs the number 1 as expected.
Files
Actions
Like0
Like0