Test the object not the class duhhh

bug/bundler_fix
Tod Beardsley 2014-01-24 11:46:48 -06:00
parent 37b11ce2e1
commit 1ff063d7de
No known key found for this signature in database
GPG Key ID: 1EFFB682ADB9F193
1 changed files with 3 additions and 3 deletions

View File

@ -341,7 +341,7 @@ class Util
# See #unpack_pointer # See #unpack_pointer
# #
def is_null_pointer(pointer) def is_null_pointer(pointer)
if pointer.class.kind_of? String if pointer.kind_of? String
pointer = unpack_pointer(pointer) pointer = unpack_pointer(pointer)
end end
@ -511,7 +511,7 @@ class Util
# Returns true if the type passed describes a data structure, false otherwise # Returns true if the type passed describes a data structure, false otherwise
def is_struct_type?(type) def is_struct_type?(type)
return type.class.kind_of? Array return type.kind_of? Array
end end
@ -526,7 +526,7 @@ class Util
return pointer_size return pointer_size
end end
if type.class.kind_of? String if type.kind_of? String
if is_array_type?(type) if is_array_type?(type)
element_type, length = split_array_type(type) element_type, length = split_array_type(type)
return length * sizeof_type(element_type) return length * sizeof_type(element_type)