ruby-changes:3872
From: ko1@a...
Date: Fri, 1 Feb 2008 11:46:01 +0900 (JST)
Subject: [ruby-changes:3872] akr - Ruby:r15361 (trunk): * tool/compile_prelude.rb (C_ESC): use octal escape to avoid
akr 2008-02-01 11:45:47 +0900 (Fri, 01 Feb 2008) New Revision: 15361 Modified files: trunk/ChangeLog trunk/tool/compile_prelude.rb Log: * tool/compile_prelude.rb (C_ESC): use octal escape to avoid "\x09for (;;) ..." to be interpret the first character 0x9f. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/tool/compile_prelude.rb?r1=15361&r2=15360&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=15361&r2=15360&diff_format=u Index: ChangeLog =================================================================== --- ChangeLog (revision 15360) +++ ChangeLog (revision 15361) @@ -1,3 +1,8 @@ +Fri Feb 1 11:44:22 2008 Tanaka Akira <akr@f...> + + * tool/compile_prelude.rb (C_ESC): use octal escape to avoid + "\x09for (;;) ..." to be interpret the first character 0x9f. + Thu Jan 31 23:06:42 2008 Yusuke Endoh <mame@t...> * test/ruby/test_bignum.rb: suppress warnings during test. Index: tool/compile_prelude.rb =================================================================== --- tool/compile_prelude.rb (revision 15360) +++ tool/compile_prelude.rb (revision 15361) @@ -16,8 +16,8 @@ "\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) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/