lib/pycall/wrapper_object_cache.rb in pycall-1.4.0 vs lib/pycall/wrapper_object_cache.rb in pycall-1.4.1
- old
+ new
@@ -4,10 +4,15 @@
begin
ObjectSpace::WeakMap.new[42] = Object.new
rescue
WMAP_SUPPORT_INT_KEY = false
else
- WMAP_SUPPORT_INT_KEY = true
+ case RUBY_PLATFORM
+ when /cygwin/, /mingw/, /mswin/
+ WMAP_SUPPORT_INT_KEY = false
+ else
+ WMAP_SUPPORT_INT_KEY = true
+ end
end
if WMAP_SUPPORT_INT_KEY
def self.get_key(pyptr)
pyptr.__address__