mirror of
https://github.com/weechat/weechat.git
synced 2026-06-25 04:16:38 +02:00
tests: use double quotes instead of simple quotes in ruby script generator
This allows to use escaped chars in strings.
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user