From: William Fulton Date: 2013-04-06T21:53:06+09:00 Subject: Re: C API version / functionality detection Macros containing text such as RUBY_VERSION can't be usefully used by the C preprocessor, but the numeric ones such as RUBY_API_VERSION_CODE or the old RUBY_VERSION_CODE can be. However, they are in version.h which poses two problems. First this file isn't always shipped (eg in some Debian based system, such as ruby-1.9.0 on Ubuntu 10.04). Secondly in order to get the macro one needs a '#include "version.h"' which is a rather commonly named file name, so it may pick up some other version.h file which is no good at all as our users are expected to use their own code. Anyway, I've fixed the problem above as rb_respond_to changed in a subtle way in 1.9 and the '== Qtrue' should be dropped to check for success. Even so, it is still nearly impossible to write extensions using new APIs if one cannot reliably determine if a new API is available or detect the version that they might have changed in. -- Posted via http://www.ruby-forum.com/.