def check_ruby_func
ruby_header = "ruby.h"
have_func("rb_define_alloc_func", ruby_header)
have_func("rb_block_proc", ruby_header)
STDOUT.print("checking for new allocation framework... ")
if Object.respond_to? :allocate
STDOUT.print "yes\n"
$defs << "-DHAVE_OBJECT_ALLOCATE"
else
STDOUT.print "no\n"
end
STDOUT.print("checking for attribute assignment... ")
STDOUT.flush
if defined? try_compile and try_compile "#include \"ruby.h\"\n#include \"node.h\"\nint node_attrasgn = (int)NODE_ATTRASGN;\n"
STDOUT.print "yes\n"
$defs << "-DHAVE_NODE_ATTRASGN"
else
STDOUT.print "no\n"
end
end