Ruby: reduce the amount of calls to GET_WIDE_KEY()

Re-opened the pull-request for the ragel-6 branch.