aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--enum.c21
-rw-r--r--ext/dbm/extconf.rb1
-rw-r--r--lib/cgi.rb8
-rw-r--r--process.c2
5 files changed, 37 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 59f30215b2..466cb0398d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+Mon Sep 4 16:39:11 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * lib/cgi.rb (CGI::out): specify -x option for nkf.
+
+ * lib/cgi.rb (CGI::out): should not convert utf-8 implicitly using
+ NKF. it is too Japanese centric.
+
+Mon Sep 4 14:23:10 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * ext/dbm/extconf.rb (db_check): remove debug print.
+
Mon Sep 4 06:46:08 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* parse.y (rb_id2sym): intern if id is attrset_id.
diff --git a/enum.c b/enum.c
index 419a2b98e4..919c53b482 100644
--- a/enum.c
+++ b/enum.c
@@ -1187,6 +1187,27 @@ enum_zip(int argc, VALUE *argv, VALUE obj)
return result;
}
+static VALUE
+in_i(VALUE i, VALUE *memo)
+{
+ if (rb_equal(i, memo[0])) {
+ memo[1] = Qtrue;
+ rb_iter_break();
+ }
+ return Qnil;
+}
+
+VALUE
+rb_enum_in(VALUE elem, VALUE obj)
+{
+ VALUE memo[2];
+
+ memo[0] = elem;
+ memo[1] = Qfalse;
+ rb_block_call(obj, id_each, 0, 0, in_i, (VALUE)&memo);
+ return memo[1];
+}
+
/*
* The <code>Enumerable</code> mixin provides collection classes with
* several traversal and searching methods, and with the ability to
diff --git a/ext/dbm/extconf.rb b/ext/dbm/extconf.rb
index 41996c417c..7a69acc7a6 100644
--- a/ext/dbm/extconf.rb
+++ b/ext/dbm/extconf.rb
@@ -34,7 +34,6 @@ def db_check(db)
for hdr in $dbm_conf_headers.fetch(db, ["ndbm.h"])
if have_header(hdr.dup) and have_type("DBM", hdr.dup, hsearch)
$defs << hsearch << '-DDBM_HDR="<'+hdr+'>"'
- p $defs
return true
end
end
diff --git a/lib/cgi.rb b/lib/cgi.rb
index 4cd497849a..8d6705c44a 100644
--- a/lib/cgi.rb
+++ b/lib/cgi.rb
@@ -718,16 +718,14 @@ class CGI
require "nkf"
case options["charset"]
when /iso-2022-jp/ni
- content = NKF::nkf('-j -m0', content)
+ content = NKF::nkf('-j -m0 -x', content)
options["language"] = "ja" unless options.has_key?("language")
when /euc-jp/ni
- content = NKF::nkf('-e -m0', content)
+ content = NKF::nkf('-e -m0 -x', content)
options["language"] = "ja" unless options.has_key?("language")
when /shift_jis/ni
- content = NKF::nkf('-s -m0', content)
+ content = NKF::nkf('-s -m0 -x', content)
options["language"] = "ja" unless options.has_key?("language")
- when /utf-8/ni
- content = NKF::nkf('-w -m0', content)
end
end
diff --git a/process.c b/process.c
index 843320193c..b0886071a7 100644
--- a/process.c
+++ b/process.c
@@ -1173,9 +1173,11 @@ rb_check_argv(int argc, VALUE *argv)
prog = RARRAY_PTR(tmp)[0];
argv[0] = RARRAY_PTR(tmp)[1];
SafeStringValue(prog);
+ StringValueCStr(prog);
}
for (i = 0; i < argc; i++) {
SafeStringValue(argv[i]);
+ StringValueCStr(argv[i]);
}
security(RSTRING_PTR(prog ? prog : argv[0]));
return prog;