diff options
Diffstat (limited to 'src/plugins/scripts/ruby')
-rw-r--r-- | src/plugins/scripts/ruby/weechat-ruby.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/scripts/ruby/weechat-ruby.c b/src/plugins/scripts/ruby/weechat-ruby.c index 127e7fa21..951177a36 100644 --- a/src/plugins/scripts/ruby/weechat-ruby.c +++ b/src/plugins/scripts/ruby/weechat-ruby.c @@ -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; |