aboutsummaryrefslogtreecommitdiff
path: root/ruby/printer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ruby/printer.rb')
-rw-r--r--ruby/printer.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/ruby/printer.rb b/ruby/printer.rb
index cfcd064..37d338a 100644
--- a/ruby/printer.rb
+++ b/ruby/printer.rb
@@ -12,7 +12,9 @@ def _pr_str(obj, print_readably=true)
obj.each{|k,v| ret.push(_pr_str(k,_r), _pr_str(v,_r))}
"{" + ret.join(" ") + "}"
when String
- if _r
+ if obj[0] == "\u029e"
+ ":" + obj[1..-1]
+ elsif _r
obj.inspect # escape special characters
else
obj