зеркало из https://github.com/github/ruby.git
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
9e0a2170fd
Коммит
52817c3654
11
ChangeLog
11
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.
|
||||
|
|
21
enum.c
21
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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче