Skip to content

Commit 6fd780b

Browse files
committed
Stop using integer for keys of WrapperObjectCache on Windows
This is because a pointer on Windows can be a Bignum.
1 parent df5f414 commit 6fd780b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/pycall/wrapper_object_cache.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ class WrapperObjectCache
66
rescue
77
WMAP_SUPPORT_INT_KEY = false
88
else
9-
WMAP_SUPPORT_INT_KEY = true
9+
case RUBY_PLATFORM
10+
when /cygwin/, /mingw/, /mswin/
11+
WMAP_SUPPORT_INT_KEY = false
12+
else
13+
WMAP_SUPPORT_INT_KEY = true
14+
end
1015
end
1116

1217
if WMAP_SUPPORT_INT_KEY

0 commit comments

Comments
 (0)