ruby: deserialize code and codewscope types.