improve ruby handling.