improve ruby ext check