The NUM2LONG and NUM2INT macros evaluate their arguments more than once.
This has been discussed ([ruby-talk 18293]), and the possibility of
fixing it with inlines was raised. But in the meantime it would be nice
if README.EXT could at least warn you not to do something like:

  NUM2LONG(rb_ary_shift(my_ary))

This will produce surprising results.