diff options
Diffstat (limited to 'tool')
-rw-r--r-- | tool/compile_prelude.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tool/compile_prelude.rb b/tool/compile_prelude.rb index 2ffccc0d93..04ecdf4444 100644 --- a/tool/compile_prelude.rb +++ b/tool/compile_prelude.rb @@ -16,8 +16,8 @@ C_ESC = { "\n" => '\n', } -0x00.upto(0x1f) {|ch| C_ESC[[ch].pack("C")] ||= "\\x%02x" % ch } -0x7f.upto(0xff) {|ch| C_ESC[[ch].pack("C")] = "\\x%02x" % ch } +0x00.upto(0x1f) {|ch| C_ESC[[ch].pack("C")] ||= "\\%03o" % ch } +0x7f.upto(0xff) {|ch| C_ESC[[ch].pack("C")] = "\\%03o" % ch } C_ESC_PAT = Regexp.union(*C_ESC.keys) def c_esc(str) |