Fix a bug in Representer.represent_object: copy_reg.dispatch_table was not correctly handled.
diff --git a/lib/yaml/representer.py b/lib/yaml/representer.py index 932dede..2516813 100644 --- a/lib/yaml/representer.py +++ b/lib/yaml/representer.py
@@ -417,7 +417,7 @@ cls = type(data) if cls in copy_reg.dispatch_table: - reduce = copy_reg.dispatch_table[cls] + reduce = copy_reg.dispatch_table[cls](data) elif hasattr(data, '__reduce_ex__'): reduce = data.__reduce_ex__(2) elif hasattr(data, '__reduce__'):