lib/ostruct.rb in ostruct-0.5.2 vs lib/ostruct.rb in ostruct-0.5.3

- old
+ new

@@ -105,11 +105,11 @@ # ending with <code>!</code>. # # For all these reasons, consider not using OpenStruct at all. # class OpenStruct - VERSION = "0.5.2" + VERSION = "0.5.3" # # Creates a new OpenStruct object. By default, the resulting OpenStruct # object will have no attributes. # @@ -244,10 +244,10 @@ else owner = method!(name).owner if owner.class == ::Class owner < ::OpenStruct else - self.class.ancestors.any? do |mod| + self.class!.ancestors.any? do |mod| return false if mod == ::OpenStruct mod == owner end end end