extract c value to ruby conversions