aetherknight / recursive-open-struct

OpenStruct subclass that returns nested hash attributes as RecursiveOpenStructs
Other
276 stars 54 forks source link

Indifferent access broken in 0.6.3 #32

Closed Kris-LIBIS closed 9 years ago

Kris-LIBIS commented 9 years ago

Unfortunately, the fix for #28 and corresponding pull #30 are breaking the implicit indifferent access behaviour that OpenStruct has and worked - at least mostly - until version 0.6.2.

The following code:

require 'recursive-open-struct'
puts "RecursiveOpenStruct version: #{RecursiveOpenStruct::VERSION}"
ros = RecursiveOpenStruct.new
ros[:foo] = 1
ros['foo'] = 2
raise '!!! BAD !!!' unless ros.foo == 2

will fail on 0.6.3, but works on 0.6.2 and earlier.