diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2010-09-08 20:49:14 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2010-09-08 20:49:14 +0200 |
commit | 691395949f3e3c1f0d064ada3b331b9c1d4e2818 (patch) | |
tree | e08a42f1d75e036875031d80e3426e8fe6413b6a /src/plugins/scripts/ruby | |
parent | 543ec96bcc15ff79bc15761d64aec6b8e3bdde5c (diff) | |
download | weechat-691395949f3e3c1f0d064ada3b331b9c1d4e2818.zip |
Fix compilation of Ruby plugin with ruby <= 1.8.6 (bug #30967)
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; |