diff options
-rwxr-xr-x | tests/scripts/python/unparse.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/scripts/python/unparse.py b/tests/scripts/python/unparse.py index f3c1066b7..e0991292b 100755 --- a/tests/scripts/python/unparse.py +++ b/tests/scripts/python/unparse.py @@ -523,6 +523,13 @@ class UnparseRuby(UnparsePython): node.attr, ) + def _ast_constant(self, node): + """Add an AST Constant in output.""" + if isinstance(node.value, str): + self.add('"%s"' % node.s.replace('#{', '\\#{')) + else: + self.add(repr(node.s)) + def _ast_dict(self, node): """Add an AST Dict in output.""" self.add( |