diff --git a/lib/rex/post/meterpreter/extensions/stdapi/railgun/util.rb b/lib/rex/post/meterpreter/extensions/stdapi/railgun/util.rb index 5f8d3a45de..0b21beed5f 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/railgun/util.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/railgun/util.rb @@ -341,7 +341,7 @@ class Util # See #unpack_pointer # def is_null_pointer(pointer) - if pointer.class.kind_of? String + if pointer.kind_of? String pointer = unpack_pointer(pointer) end @@ -511,7 +511,7 @@ class Util # Returns true if the type passed describes a data structure, false otherwise def is_struct_type?(type) - return type.class.kind_of? Array + return type.kind_of? Array end @@ -526,7 +526,7 @@ class Util return pointer_size end - if type.class.kind_of? String + if type.kind_of? String if is_array_type?(type) element_type, length = split_array_type(type) return length * sizeof_type(element_type)