Use defined? instead of version float check.
parent
ba00395cfd
commit
87d8e16001
|
@ -13,7 +13,7 @@ module OSXRubyDLHelpers
|
|||
end
|
||||
|
||||
def malloc(size)
|
||||
if ruby_1_9_or_higher?
|
||||
if defined?(DL::CPtr)
|
||||
DL::CPtr.malloc(size)
|
||||
else
|
||||
DL::malloc(size)
|
||||
|
|
Loading…
Reference in New Issue