From: Tim Hunter Date: 2009-02-20T11:42:49+09:00 Subject: Re: How to do conditional compile for Ruby 1.9 in a C extens Jason Garber wrote: > version.h couldn't be found. I've read that version.h is deprecated in > Ruby 1.9. There's either got to be another way to detect the change or > a way to work around it. I'd just use map! to convert the strings to > symbols if I knew how to do it in C. I'm not saying this is the best way (maybe Nobu can provide a better answer), but if you can be sure that mkmf.rb is being executed by the same version of Ruby, then you could cook up a feature test in your extconf.rb that would create a preprocessor symbol to test. Determine what singleton_methods is doing, then call $defs.push to set a symbol: $defs.push("-DNEW_SINGLETON_METHODS") -- RMagick: http://rmagick.rubyforge.org/