RubyInlineを使うとCを埋め込めるらしいので試してみた。 $:.unshift File.dirname(__FILE__) require 'rubygems' require 'inline' VERSION = '0.0.1' class KQueue inline do |builder| builder.include "<sys/event.h>" builder.include "<sys/time.h>" builder.include "<unistd.h>" builder.include "<errno.h>" =begin builder.map_c_const({ 'EVFILT_READ' => 'int', 'EVFILT_WRITE' => 'int', 'EVFILT_AIO' => 'int', 'EVFILT_VNODE' => 'int',