[#35333] [Ruby 1.8 - Bug #221] (Open) Net::SMTPでSMTPのHELO/EHLOにデフォルトで不正なホスト名を使用 — Anonymous <redmine@...>
チケット #221 が報告されました。 (by Anonymous)
チケット #221 が更新されました。 (by Masahiro Tomita)
チケット #221 が更新されました。 (by Anonymous)
とみたです。
とみたです。
卜部です。
西山和広です。
[#35355] リリース前ToDoリスト — Yukihiro Matsumoto <matz@...>
まつもと ゆきひろです
なかだです。
まつもと ゆきひろです
高尾宏治です。
高尾宏治です。
なかだです。
高尾宏治です。
なかだです。
前田です。
なかだです。
前田です。
なかだです。
高尾宏治です。
山口と申します。
高尾宏治です。
高尾宏治です。
高尾宏治です。
GyRCJDMkcyRLJEEkTyEjGyhCTS5TdXp1a2kbJEIkRyQ5ISMbKEINCg0KGyRCO24kNyRGJF8kXiQ3
高尾宏治です。
高尾宏治です。
高尾宏治です。
GyRCJDMkcyRLJEEkTxsoQiBNLlN1enVraSAbJEIkRyQ5ISMbKEINCg0KTWFjIE9TWCAxMC40GyRC
高尾宏治です。
[#35372] patch for ruby-core:17472 — wanabe <s.wanabe@...>
ワナベと申します。
なかだです。
ワナベです。
遠藤です。
=1B$B$`$i$?$G$9!#=1B(B
豊福です。
[#35375] Re: [ruby-cvs:25121] Ruby:r17902 (ruby_1_8_6): * re.c (rb_reg_search): need to free allocated buffer in re_register. [ruby-core:17518] — Urabe Shyouhei <shyouhei@...>
卜部です。ruby_1_8_xの枝を弄る人全員にお願いです。チェックインする前に必
[#35389] Re: [ruby-cvs:25164] Ruby:r17945 (trunk, ruby_1_8): * string.c (rb_str_succ): limit carrying in an alphanumeric region if — Yukihiro Matsumoto <matz@...>
まつもと ゆきひろです
[#35396] cc always picks ruby/ruby.h on OS X — "Akinori MUSHA" <knu@...>
ruby 1.8 の tk ライブラリが OS X 上でビルドできない件です。
[#35404] ruby_1_8_6/ruby_1_8_7ブランチのメンテナンスポリシーについて — "Shugo Maeda" <shugo@...>
前田です。
卜部です。
前田です。
卜部です。
前田です。
Shugo Maeda さんは書きました:
どこにぶら下げるのがいいのかわからないので、単に意思表明ですが、
卜部です。
At Fri, 11 Jul 2008 01:00:29 +0900,
前田です。
In article <704d5db90807110028o238594f2wda0ec1bf12abc940@mail.gmail.com>,
そういえばこの部分に言及するのを忘れていた
前田です。
卜部です。
前田です。
In article <704d5db90807121803o5ea67361ucbf968f8a18a845d@mail.gmail.com>,
Tanaka Akira さんは書きました:
前田です。
卜部です。
前田です。
卜部です。
前田です。
卜部です。
前田です。
こんにちは、なかむら(う)です。
卜部です。
[#35420] Re: [ruby-cvs:25212] Ruby:r17993 (trunk): * test/ruby/envutil.rb (assert_normal_exit): finish writing script — Tanaka Akira <akr@...>
In article <200807100931.m6A9V4vi014459@ci.ruby-lang.org>,
ワナベです。
こんにちは、なかむら(う)です。
ワナベです。
こんにちは、なかむら(う)です。
こんにちは、なかむら(う)です。
In article <20080711050939.531D.C613B076@garbagecollect.jp>,
こんにちは、なかむら(う)です。
[#35446] [Bug:trunk] Thread#kill cannot break BLOCKING_REGION() on windows — "U.Nakamura" <usa@...>
こんにちは、なかむら(う)です。
[#35450] [BUG] cfp consistency error in Win32OLE — Masaki Suketa <masaki.suketa@...>
助田です。
ワナベと申します。
助田です。
[#35458] make profiler for gc — authorNari <authornari@...>
nariです。
In article <1153cee60807122239t19f6ae05vc0c1995c77349377@mail.gmail.com>,
nariです。
nariです。
三浦と申します。
[#35471] [Bug: 1.9] lazy timer thraed creation — SASADA Koichi <ko1@...>
ささだです.
[#35484] Re: [ruby-core:17739] [Ruby 1.9 - Bug #256] (Open) defined?(Gem::RubyGemsVersion) behaves strange — wanabe <s.wanabe@...>
ワナベと申します。
西山和広です。
斎藤と申します。
[#35542] [Bug:1.9] sleep and Thread#run — Tanaka Akira <akr@...>
1.9 では sleep で寝ているスレッドを Thread#run で起こせない
[#35545] Test::Unit -> miniunit — Kouhei Sutou <kou@...>
須藤です。
まつもと ゆきひろです
[#35555] [Ruby 1.9 - Bug #282] (Open) failure of test_asctime(TestTime) on mswin32 — Usaku NAKAMURA <redmine@...>
チケット #282 が報告されました。 (by Usaku NAKAMURA)
ワナベと申します。
[#35578] [Bug:1.9] context switch may occur during freeing io — "Yusuke ENDOH" <mame@...>
遠藤です。
[#35597] [request]C APIの拡張 — "Goro Fuji" <g.psy.va@...>
藤と申します。
なかだです。
ご意見ありがとうございます。
なかだです。
卜部さん
卜部です。
[#35620] non-locale filename encoding — Tanaka Akira <akr@...>
Dir の使いかたとして、ファイル名のエンコーディングが locale
成瀬です。
In article <48866F3F.80906@airemix.jp>,
成瀬です。
In article <488771FD.4020800@airemix.jp>,
Tanaka Akira wrote:
In article <4888B29D.7030009@airemix.jp>,
成瀬です。
In article <488AC157.7090203@airemix.jp>,
[#35646] [Bug:1.9] Rinda has a race condition — "Yusuke ENDOH" <mame@...>
遠藤です。
[#35648] [Bug:1.9] MingwでIO#dupがブロックする — wanabe <s.wanabe@...>
ワナベと申します。
[#35649] PENDINGS.rb (Was: Re: [Ruby 1.9 - Bug #354] (Assigned) Test failure test/ruby/test_transcode.rb) — "Yusuke ENDOH" <mame@...>
遠藤です。
In article <e0b1e5700807240845o4c09cfa5gae142c1dd0c74170@mail.gmail.com>,
2008/07/25 1:02 Tanaka Akira <akr@fsij.org>:
成瀬です。
遠藤です。
In article <e0b1e5700807290517mee11539lfbd82d4dfc98c53f@mail.gmail.com>,
遠藤です。
In article <e0b1e5700807300311v13752775mcf8bb5086753051d@mail.gmail.com>,
[#35669] [Ruby 1.9 - Bug #368] (Open) 境界における Math.atanh 等の動作 — Yui NARUSE <redmine@...>
チケット #368 が報告されました。 (by Yui NARUSE)
斎藤と申します。
[#35681] [Ruby 1.9 - Bug #369] (Open) Ruby 1.9.0-3で R — Akira Matsuda <redmine@...>
チケット #369 が報告されました。 (by Akira Matsuda)
[ruby-dev:35645] Re: [Ruby 1.8 - Bug #212] Issues with Readline in Mac OS X
高尾宏治です。
On 2008/07/23, at 23:14, Takao Kouji wrote:
> ただ、Readlineモジュールの入力履歴を扱うメソッドは、
> 例外NotImplementedErrorが発生するかもしれないので、
> それに対応したテストを記述する必要がありました。
> 現在、この作業中です。
>
> この作業が終わったら、パッチを本MLに報告する予定です。
テストを修正しました。
本メールの下部にパッチを記述しています。
これまでのパッチをいったんrevertしてから試してください。
今回のパッチには、
$SAFE = 4のときの例外SecurityErrorが発生することを確認するためのテストを追加しています。
あと、入力履歴をクリアするReadline::HISTORY.clearメソッドを追加しています。
> Mac OSX 10.4の環境でもテストしてみます。
まだ、Mac OSX 10.4でのテストはまで作業していません。
あとで作業する予定です。(が、作業していただけると助かります。)
しかしながら、[ruby-dev:35557]の以下の記述から推測すると、
テストに失敗することが想定されます。
> msuzuki$ uname -a
> Darwin PowerBookG4.local 8.11.0 Darwin Kernel Version 8.11.0: Wed Oct
> 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC Power Macintosh
> powerpc
> msuzuki$ cc -o libedittest libedittest.c -ledit
> msuzuki$ ./libedittest
> history_base: 1 added 1, 2, 3 to history history_base: 1
> history_length: 3
> history_get(history_base): 1
> history_get(0): NULL
> history_get(1): NULL
> history_get(2): NULL
> history_get(3): NULL
Mac OSX 10.4の標準添付のrubyが
readlineモジュールをコンパイルしていないことから、
10.4環境でののReadline::HISTORYは無効にしても良いように思います。
無効といってもHISTORYを定義しないとか、
例外NotImplementedErrorが発生とか、いろいろ方法はあると思いますが、
具体的になにがいいかは検討できていません。
以上です。
----- ここから -----
Index: ext/readline/readline.c
===================================================================
--- ext/readline/readline.c (revision 18194)
+++ ext/readline/readline.c (working copy)
@@ -29,6 +29,8 @@
static VALUE mReadline;
+#define EDIT_LINE_LIBRARY_VERSION "EditLine wrapper"
+
#define COMPLETION_PROC "completion_proc"
#define COMPLETION_CASE_FOLD "completion_case_fold"
static ID completion_proc, completion_case_fold;
@@ -43,6 +45,8 @@
# define rl_completion_matches completion_matches
#endif
+static int (*history_get_offset_func)(int);
+
static char **readline_attempted_completion_function(const char *text,
int start, int end);
@@ -505,10 +509,22 @@
return rb_str_new2("HISTORY");
}
+static int
+history_get_offset_history_base(int offset)
+{
+ return history_base + offset;
+}
+
+static int
+history_get_offset_0(int offset)
+{
+ return offset;
+}
+
static VALUE
hist_get(VALUE self, VALUE index)
{
- HIST_ENTRY *entry;
+ HIST_ENTRY *entry = NULL;
int i;
rb_secure(4);
@@ -516,7 +532,9 @@
if (i < 0) {
i += history_length;
}
- entry = history_get(history_base + i);
+ if (i >= 0) {
+ entry = history_get(history_get_offset_func(i));
+ }
if (entry == NULL) {
rb_raise(rb_eIndexError, "invalid index");
}
@@ -527,7 +545,7 @@
hist_set(VALUE self, VALUE index, VALUE str)
{
#ifdef HAVE_REPLACE_HISTORY_ENTRY
- HIST_ENTRY *entry;
+ HIST_ENTRY *entry = NULL;
int i;
rb_secure(4);
@@ -536,7 +554,9 @@
if (i < 0) {
i += history_length;
}
- entry = replace_history_entry(i, RSTRING_PTR(str), NULL);
+ if (i >= 0) {
+ entry = replace_history_entry(i, RSTRING_PTR(str), NULL);
+ }
if (entry == NULL) {
rb_raise(rb_eIndexError, "invalid index");
}
@@ -581,7 +601,7 @@
entry = remove_history(index);
if (entry) {
val = rb_tainted_str_new2(entry->line);
- free(entry->line);
+ free((void *) entry->line);
free(entry);
return val;
}
@@ -624,7 +644,7 @@
rb_secure(4);
for (i = 0; i < history_length; i++) {
- entry = history_get(history_base + i);
+ entry = history_get(history_get_offset_func(i));
if (entry == NULL)
break;
rb_yield(rb_tainted_str_new2(entry->line));
@@ -662,6 +682,19 @@
}
static VALUE
+hist_clear(VALUE self)
+{
+#ifdef HAVE_CLEAR_HISTORY
+ rb_secure(4);
+ clear_history();
+ return self;
+#else
+ rb_notimplement();
+ return Qnil; /* not reached */
+#endif
+}
+
+static VALUE
filename_completion_proc_call(VALUE self, VALUE str)
{
VALUE result;
@@ -782,6 +815,7 @@
rb_define_singleton_method(history,"size", hist_length, 0);
rb_define_singleton_method(history,"empty?", hist_empty_p, 0);
rb_define_singleton_method(history,"delete_at", hist_delete_at, 1);
+ rb_define_singleton_method(history,"clear", hist_clear, 0);
rb_define_const(mReadline, "HISTORY", history);
fcomp = rb_obj_alloc(rb_cObject);
@@ -793,8 +827,19 @@
rb_define_singleton_method(ucomp, "call",
username_completion_proc_call, 1);
rb_define_const(mReadline, "USERNAME_COMPLETION_PROC", ucomp);
+ history_get_offset_func = history_get_offset_history_base;
#if defined HAVE_RL_LIBRARY_VERSION
rb_define_const(mReadline, "VERSION", rb_str_new2(rl_library_version));
+#if defined HAVE_CLEAR_HISTORY
+ if (strncmp(rl_library_version, EDIT_LINE_LIBRARY_VERSION,
+ strlen(EDIT_LINE_LIBRARY_VERSION)) == 0) {
+ add_history("1");
+ if (history_get(history_get_offset_func(0)) == NULL) {
+ history_get_offset_func = history_get_offset_0;
+ }
+ clear_history();
+ }
+#endif
#else
rb_define_const(mReadline, "VERSION", rb_str_new2("2.0 or prior version"));
#endif
Index: ext/readline/extconf.rb
===================================================================
--- ext/readline/extconf.rb (revision 18194)
+++ ext/readline/extconf.rb (working copy)
@@ -66,4 +66,5 @@
have_readline_func("rl_emacs_editing_mode")
have_readline_func("replace_history_entry")
have_readline_func("remove_history")
+have_readline_func("clear_history")
create_makefile("readline")
Index: test/readline/test_readline_history.rb
===================================================================
--- test/readline/test_readline_history.rb (revision 0)
+++ test/readline/test_readline_history.rb (revision 0)
@@ -0,0 +1,313 @@
+begin
+ require "readline"
+=begin
+ class << Readline::HISTORY
+ def []=(index, str)
+ raise NotImplementedError
+ end
+
+ def pop
+ raise NotImplementedError
+ end
+
+ def shift
+ raise NotImplementedError
+ end
+
+ def delete_at(index)
+ raise NotImplementedError
+ end
+ end
+=end
+
+=begin
+ class << Readline::HISTORY
+ def clear
+ raise NotImplementedError
+ end
+ end
+=end
+rescue LoadError
+else
+ require "test/unit"
+end
+
+class Readline::TestHistory < Test::Unit::TestCase
+ include Readline
+
+ def setup
+ HISTORY.clear
+ end
+
+ def test_safe_level_4
+ method_args =
+ [
+ ["[]", [0]],
+ ["[]=", [0, "s"]],
+ ["\<\<", ["s"]],
+ ["push", ["s"]],
+ ["pop", []],
+ ["shift", []],
+ ["length", []],
+ ["delete_at", [0]],
+ ["clear", []],
+ ]
+ method_args.each do |method_name, args|
+ assert_raises(SecurityError,
+ "method=<#{method_name}>") do
+ Thread.start {
+ $SAFE = 4
+ HISTORY.send(method_name.to_sym, *args)
+ assert(true)
+ }.join
+ end
+ end
+
+ assert_raises(SecurityError, NotImplementedError,
+ "method=<each>") do
+ Thread.start {
+ $SAFE = 4
+ HISTORY.each { |s|
+ assert(true)
+ }
+ }.join
+ end
+ end
+
+ def test_to_s
+ assert_equal("HISTORY", HISTORY.to_s)
+ end
+
+ def test_get
+ lines = push_history(5)
+ lines.each_with_index do |s, i|
+ assert_equal(s, HISTORY[i])
+ end
+ end
+
+ def test_get__negative
+ lines = push_history(5)
+ (1..5).each do |i|
+ assert_equal(lines[-i], HISTORY[-i])
+ end
+ end
+
+ def test_get__out_of_range
+ lines = push_history(5)
+ invalid_indexes = [5, 6, 100, -6, -7, -100]
+ invalid_indexes.each do |i|
+ assert_raise(IndexError, "i=<#{i}>") do
+ HISTORY[i]
+ end
+ end
+
+ invalid_indexes = [100_000_000_000_000_000_000,
+ -100_000_000_000_000_000_000]
+ invalid_indexes.each do |i|
+ assert_raise(RangeError, "i=<#{i}>") do
+ HISTORY[i]
+ end
+ end
+ end
+
+ def test_set
+ begin
+ lines = push_history(5)
+ 5.times do |i|
+ expected = "set: #{i}"
+ HISTORY[i] = expected
+ assert_equal(expected, HISTORY[i])
+ end
+ rescue NotImplementedError
+ end
+ end
+
+ def test_set__out_of_range
+ assert_raises(IndexError, NotImplementedError, "index=<0>") do
+ HISTORY[0] = "set: 0"
+ end
+
+ lines = push_history(5)
+ invalid_indexes = [5, 6, 100, -6, -7, -100]
+ invalid_indexes.each do |i|
+ assert_raises(IndexError, NotImplementedError, "index=<#{i}>") do
+ HISTORY[i] = "set: #{i}"
+ end
+ end
+
+ invalid_indexes = [100_000_000_000_000_000_000,
+ -100_000_000_000_000_000_000]
+ invalid_indexes.each do |i|
+ assert_raise(RangeError, NotImplementedError, "index=<#{i}>") do
+ HISTORY[i] = "set: #{i}"
+ end
+ end
+ end
+
+ def test_push
+ 5.times do |i|
+ assert_equal(HISTORY, HISTORY.push(i.to_s))
+ assert_equal(i.to_s, HISTORY[i])
+ end
+ assert_equal(5, HISTORY.length)
+ end
+
+ def test_push__operator
+ 5.times do |i|
+ assert_equal(HISTORY, HISTORY << i.to_s)
+ assert_equal(i.to_s, HISTORY[i])
+ end
+ assert_equal(5, HISTORY.length)
+ end
+
+ def test_push__plural
+ assert_equal(HISTORY, HISTORY.push("0", "1", "2", "3", "4"))
+ (0..4).each do |i|
+ assert_equal(i.to_s, HISTORY[i])
+ end
+ assert_equal(5, HISTORY.length)
+
+ assert_equal(HISTORY, HISTORY.push("5", "6", "7", "8", "9"))
+ (5..9).each do |i|
+ assert_equal(i.to_s, HISTORY[i])
+ end
+ assert_equal(10, HISTORY.length)
+ end
+
+ def test_pop
+ begin
+ assert_equal(nil, HISTORY.pop)
+
+ lines = push_history(5)
+ (1..5).each do |i|
+ assert_equal(lines[-i], HISTORY.pop)
+ assert_equal(lines.length - i, HISTORY.length)
+ end
+
+ assert_equal(nil, HISTORY.pop)
+ rescue NotImplementedError
+ end
+ end
+
+ def test_shift
+ begin
+ assert_equal(nil, HISTORY.shift)
+
+ lines = push_history(5)
+ (0..4).each do |i|
+ assert_equal(lines[i], HISTORY.shift)
+ assert_equal(lines.length - (i + 1), HISTORY.length)
+ end
+
+ assert_equal(nil, HISTORY.shift)
+ rescue NotImplementedError
+ end
+ end
+
+ def test_each
+ HISTORY.each do |s|
+ assert(false) # not reachable
+ end
+ lines = push_history(5)
+ i = 0
+ HISTORY.each do |s|
+ assert_equal(HISTORY[i], s)
+ assert_equal(lines[i], s)
+ i += 1
+ end
+ end
+
+ def test_each__enumerator
+ e = HISTORY.each
+ assert_instance_of(Enumerable::Enumerator, e)
+ end
+
+ def test_length
+ assert_equal(0, HISTORY.length)
+ push_history(1)
+ assert_equal(1, HISTORY.length)
+ push_history(4)
+ assert_equal(5, HISTORY.length)
+ HISTORY.clear
+ assert_equal(0, HISTORY.length)
+ end
+
+ def test_empty_p
+ 2.times do
+ assert(HISTORY.empty?)
+ HISTORY.push("s")
+ assert_equal(false, HISTORY.empty?)
+ HISTORY.clear
+ assert(HISTORY.empty?)
+ end
+ end
+
+ def test_delete_at
+ begin
+ lines = push_history(5)
+ (0..4).each do |i|
+ assert_equal(lines[i], HISTORY.delete_at(0))
+ end
+ assert(HISTORY.empty?)
+
+ lines = push_history(5)
+ (1..5).each do |i|
+ assert_equal(lines[lines.length - i], HISTORY.delete_at(-1))
+ end
+ assert(HISTORY.empty?)
+
+ lines = push_history(5)
+ assert_equal(lines[0], HISTORY.delete_at(0))
+ assert_equal(lines[4], HISTORY.delete_at(3))
+ assert_equal(lines[1], HISTORY.delete_at(0))
+ assert_equal(lines[3], HISTORY.delete_at(1))
+ assert_equal(lines[2], HISTORY.delete_at(0))
+ assert(HISTORY.empty?)
+ rescue NotImplementedError
+ end
+ end
+
+ def test_delete_at__out_of_range
+ assert_raises(IndexError, NotImplementedError, "index=<0>") do
+ HISTORY.delete_at(0)
+ end
+
+ lines = push_history(5)
+ invalid_indexes = [5, 6, 100, -6, -7, -100]
+ invalid_indexes.each do |i|
+ assert_raises(IndexError, NotImplementedError, "index=<#{i}>") do
+ HISTORY.delete_at(i)
+ end
+ end
+
+ invalid_indexes = [100_000_000_000_000_000_000,
+ -100_000_000_000_000_000_000]
+ invalid_indexes.each do |i|
+ assert_raises(RangeError, NotImplementedError, "index=<#{i}>") do
+ HISTORY.delete_at(i)
+ end
+ end
+ end
+
+ private
+
+ def push_history(num)
+ lines = []
+ num.times do |i|
+ s = "a"
+ i.times do
+ s = s.succ
+ end
+ lines.push("#{i + 1}:#{s}")
+ end
+ HISTORY.push(*lines)
+ return lines
+ end
+end if defined?(::Readline) && defined?(::Readline::HISTORY) &&
+ (
+ begin
+ Readline::HISTORY.clear
+ rescue NotImplementedError
+ false
+ end
+ )