1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 06:16:40 +02:00

Fix compilation of Ruby plugin with ruby <= 1.8.6 (bug #30967)

This commit is contained in:
Sebastien Helleu
2010-09-08 20:49:14 +02:00
parent 543ec96bcc
commit 691395949f
+6
View File
@@ -177,7 +177,13 @@ weechat_ruby_hash_to_hashtable (VALUE hash, int hashtable_size)
if (!hashtable)
return NULL;
/* RHASH_TBL exists in ruby 1.8.7 but not ruby 1.8.6 */
#ifdef RHASH_TBL
st = RHASH_TBL(hash);
#else
st = RHASH(hash)->tbl;
#endif
rb_hash_foreach (hash, &weechat_ruby_hash_foreach_cb, (unsigned long)hashtable);
return hashtable;