aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/socket/mkconstants.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d56f296aa6..ff08b5ba01 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Jan 11 09:53:01 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * 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@ruby-lang.org>
* hash.c (rb_hash_s_create): set nil as the value if assoc length
diff --git a/ext/socket/mkconstants.rb b/ext/socket/mkconstants.rb
index 5bedbac5ac..518618c45e 100644
--- a/ext/socket/mkconstants.rb
+++ b/ext/socket/mkconstants.rb
@@ -24,7 +24,7 @@ C_ESC = {
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!