Hash

This would be clearer:
raise "Key must be a string!" unless key.is_a?(String)