about summary refs log tree commit homepage
path: root/ext/kcar/extconf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/kcar/extconf.rb')
-rw-r--r--ext/kcar/extconf.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/kcar/extconf.rb b/ext/kcar/extconf.rb
index ba69c3c..1608f70 100644
--- a/ext/kcar/extconf.rb
+++ b/ext/kcar/extconf.rb
@@ -24,8 +24,11 @@ end
 
 message('checking if Hash#[]= (rb_hash_aset) dedupes... ')
 h = {}
-h[%w(m k m f).join('')] = :foo
-if 'mkmf'.freeze.equal?(h.keys[0])
+x = {}
+r = rand.to_s
+h[%W(#{r}).join('')] = :foo
+x[%W(#{r}).join('')] = :foo
+if x.keys[0].equal?(h.keys[0])
   $CPPFLAGS += ' -DHASH_ASET_DEDUPE=1 '
   message("yes\n")
 else