I would maybe avoid the hash delete. I try not to modify things passed in. I would either dup and delete or just read the key and not do the delete.