From 8bf53bec72d27d7d895b39812ffae1e990425158 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Thu, 10 Apr 2014 22:24:58 -0500 Subject: Ruby: step4_if_fn_do with core functions. --- ruby/printer.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'ruby/printer.rb') diff --git a/ruby/printer.rb b/ruby/printer.rb index 2d46e07..424ca23 100644 --- a/ruby/printer.rb +++ b/ruby/printer.rb @@ -9,9 +9,7 @@ def _pr_str(obj, print_readably=true) "[" + obj.map{|x| _pr_str(x, _r)}.join(" ") + "]" when String if _r - "\"" + obj.gsub(/\\/, "\\\\") \ - .gsub(/"/, "\\\\\"") \ - .gsub(/\n/, "\\\\n") + "\"" + obj.inspect # escape special characters else obj end -- cgit v1.2.3