From: Takao Kouji Date: 2008-07-31T22:59:50+09:00 Subject: [ruby-dev:35707] Re: [Ruby 1.8 - Bug #212] Issues with Readline in Mac OS X 高尾宏治です。 On 2008/07/31, at 10:05, M.Suzuki wrote: > Mac OSX 10.4で新しいパッチをテストしてみました。 ありがとうございます。 > msuzuki$ ./ruby --version > ruby 1.9.0 (2008-07-31 revision 0) [powerpc-darwin8.11.0] > > msuzuki$ ./ruby -I.ext/powerpc-darwin8.11.0 / -rreadline > test/readline/test_readline_history.rb Loaded suite > test/readline/test_readline_history Started > ....F...F....F.... > Finished in 0.173369 seconds. > > 1) Failure: > test_empty_p(Readline::TestHistory) > [test/readline/test_readline_history.rb:237:in `block in > test_empty_p' test/readline/test_readline_history.rb:236:in `times' > test/readline/test_readline_history.rb:236:in `test_empty_p']: > is not true. > > 2) Failure: > test_length(Readline::TestHistory) > [test/readline/test_readline_history.rb:226]: <0> expected but was > <5>. なんか変な挙動をしていますね。 HISTORY.pushしたのにempty?がtrueのようですね。 つまり、libeditのadd_history関数を処理しても、 実際にはヒストリに追加されず、history_lengthが0のままのようです。 これは参った。これって対応できるのかな。 > 3) Failure: > test_safe_level_4(Readline::TestHistory) > [test/readline/test_readline_history.rb:56:in `block in > test_safe_level_4' test/readline/test_readline_history.rb:55:in `each' > test/readline/test_readline_history.rb:55:in `test_safe_level_4']: > method=<[]=>. > exception expected but was > Class: > Message: <"[]=() function is unimplemented on this machine"> > ---Backtrace--- > test/readline/test_readline_history.rb:60:in `[]=' > test/readline/test_readline_history.rb:60:in `block (3 levels) in > test_safe_level_4' > --------------- 上記はテストのバグでした。 情報ありがとうございました。 > やはり history 周りはダメっぽいですね。 > そもそもライブラリがおかしい様なので、どうしようもないのかも。 GNU Readlineをインストールしてくださいってことでもいいかもしれませんね。 > マニュアルの注意事項に載せておくとかFAQを作っておいた方が良いかも。 そうですね。 今、ReadlineのRDocを記述している最中なので、検討してみます。 > # ちなみに [ruby-dev:35645] のパッチは行頭の空白が失われている(?)ので > # そのままでは patch に読ませられませんでした。 > # 大きなパッチではないので、+-以外の行にスペースを追加しましたが、 > # patch のオプションでなんとかなるのかな。。。 そうでしたか、失礼しました。 Mac OSX 10.5のMail.appを使用しているのですが、 コピペしたときにスペースが削られたのかもしれませんね。まいったな。