# File lib/ffi/struct.rb, line 305 def enclosing_module begin mod = self.name.split("::")[0..-2].inject(Object) { |obj, c| obj.const_get(c) } (mod < FFI::Library || mod < FFI::Struct || mod.respond_to?(:find_type)) ? mod : nil rescue Exception nil end end