Hi Liming,

On Dec 18, 2007 6:35 PM, lianliming <lianliming / gmail.com> wrote:
> Hi all,
>
> I am hacking some existing Ruby c extension, and found code like
> following:
>
> #ifdef RUBY_VM
>  .....
> #endif

This will be code in ruby-oci8 trunk.
There is no article documenting RUBY_VM.
I use it to check whether the ruby's thread model is green or native,
in other words, whether the ruby version is 1.8 or 1.9.

#ifdef RUBY_VM
 code for ruby 1.9
#else
 code for ruby 1.8
#endif

I want RUBY_VERSION_MAJOR, RUBY_VERSION_MINOR and so on.
But there is no macro describing ruby version. I use RUBY_VM instead.