From: Jason Garber Date: 2009-02-20T02:21:24+09:00 Subject: How to do conditional compile for Ruby 1.9 in a C extension? I'm working on updating RedCloth for Ruby 1.9. Since the output of #singleton_methods changed from strings to symbols, I think I need a conditional compile. Here's what I tried: #if RUBY_VERSION < 0x10900 if (rb_ary_includes(rb_funcall(self, rb_intern("singleton_methods"), 0), btype)) { #else if (rb_ary_includes(rb_funcall(self, rb_intern("singleton_methods"), 0), rb_str_intern(btype))) { #endif -- Posted via http://www.ruby-forum.com/.