[前][次][番号順一覧][スレッド一覧]

ruby-changes:9884

From: nobu <ko1@a...>
Date: Sun, 11 Jan 2009 09:53:19 +0900 (JST)
Subject: [ruby-changes:9884] Ruby:r21425 (trunk): * ext/socket/mkconstants.rb (c_str): get rid of a 1.9 feature for

nobu	2009-01-11 09:53:03 +0900 (Sun, 11 Jan 2009)

  New Revision: 21425

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21425

  Log:
    * ext/socket/mkconstants.rb (c_str): get rid of a 1.9 feature for
      cross compile.  [ruby-core:21243]

  Modified files:
    trunk/ChangeLog
    trunk/ext/socket/mkconstants.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 21424)
+++ ChangeLog	(revision 21425)
@@ -1,3 +1,8 @@
+Sun Jan 11 09:53:01 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* ext/socket/mkconstants.rb (c_str): get rid of a 1.9 feature for
+	  cross compile.  [ruby-core:21243]
+
 Sun Jan 11 09:47:30 2009  Nobuyoshi Nakada  <nobu@r...>
 
 	* hash.c (rb_hash_s_create): set nil as the value if assoc length
Index: ext/socket/mkconstants.rb
===================================================================
--- ext/socket/mkconstants.rb	(revision 21424)
+++ ext/socket/mkconstants.rb	(revision 21425)
@@ -24,7 +24,7 @@
 C_ESC_PAT = Regexp.union(*C_ESC.keys)
 
 def c_str(str)
-  '"' + str.gsub(C_ESC_PAT, C_ESC) + '"'
+  '"' + str.gsub(C_ESC_PAT) {|s| C_ESC[s]} + '"'
 end
 
 opt.parse!

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]