[#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:35551] [Ruby 1.8 - Bug #212] Issues with Readline in Mac OS X
高尾宏治です。
# Subjectを変えます。
On 2008/07/16, at 15:33, Nobuyoshi Nakada wrote:
> At Wed, 16 Jul 2008 11:45:06 +0900,
> Shugo Maeda wrote in [ruby-dev:35532]:
>> Ruby側でとりあえず対応するという点については異論はないのですが、
>> バグだとしたらバージョンによって挙動が変わったら嫌だなと思いました。
>
> 初期化のときにチェックするなら、バージョンが変わっても気にしなく
> てすむと思います。
初期化の時にチェックするのも良さそうですね。
ただし、Readlineの拡張ライブラリの初期化時に、
毎回 libedit とリンクしているかどうかを確認するのは、
どうかということがあると思います。
これについては、Init_readline()で以下のような処理をすると思うのですが、
対したコストではないため、気にしなくても良いのかもしれません。
if (strncmp(rl_library_version, "EditLine wrapper",
strlen("EditLine wrapper")) == 0) {
/* libedit の場合の処理 */
}
else {
/* libedit の場合の処理 */
}
>>>> 高尾君のパッチと大分趣が異なるような気がするのですが、どういう意図でしょうか。
>>>
>>> history_baseの初期値を保存しておいて、そこからの差分で見るという
>>> ことです。
>>
>> 自分がlibeditの挙動を理解していないだけかもしれないのですが、それで上手く
>> 動くのでしょうか。
>> 高尾君のパッチではたんにhistory_baseをhistory_base - 1にしているだけだった
>> ので、libeditではhistory_baseの値が1ずれているとかそういう話なのかなと思った
>> のですが。
>
> そのズレの値を初期状態でとれないかと思ったのですが、初期値はずれ
> ているわけではないとしたら的外れかもしれません。後は、
> remove_history()があるならですが、[ruby-dev:35519]のテストコード
> を実行してみるとかしかないですね。
>
> ついでにいえば、remove_history()やreplace_history_entry()も同じ
> くindexをとるわけですが、こちらは問題ないんでしょうか。
問題がありました。
どうも、ヒストリのインデックスの開始が、
* GNU Readline は 1。(history_base と同じ)
* libedit は 0。
という違いがあるようです。
このため、remove_historyなども同様に修正する必要がありました。
これは以下のコードで確認しました。
----- ここから -----
#include <stdio.h>
#ifdef HAVE_EDITLINE_READLINE_H
#include <editline/readline.h>
#else
#include <readline/readline.h>
#include <readline/history.h>
#endif /* HAVE_EDITLINE_READLINE_H */
int main(int argc, char **argv)
{
HIST_ENTRY *entry;
int i;
using_history();
printf("history_base: %d\n", history_base);
add_history("1");
add_history("2");
add_history("3");
printf("added 1, 2, 3 to history\n");
printf("history_base: %d\n", history_base);
printf("history_length: %d\n", history_length);
entry = history_get(history_base);
printf("history_get(history_base): %s\n", entry->line);
for (i = 0; i <= history_length; i++) {
entry = history_get(i);
printf("history_get(%d): %s\n", i, entry ? entry->line : "NULL");
}
return 0;
}
----- ここまで -----
以下、GNU Readline、Mac OSX の libedit、
libedit の 20080712-2.11 で実行した結果です。
----- ここから -----
---- no212_on-macosx.gnu_readline ----
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): 1
history_get(2): 2
history_get(3): 3
---- no212_on-macosx.editline ----
history_base: 1
added 1, 2, 3 to history
history_base: 1
history_length: 3
history_get(history_base): 2
history_get(0): 1
history_get(1): 2
history_get(2): 3
history_get(3): NULL
---- no212_on-macosx.editline_20080712-2.11 ----
history_base: 1
added 1, 2, 3 to history
history_base: 1
history_length: 3
history_get(history_base): 2
history_get(0): 1
history_get(1): 2
history_get(2): 3
history_get(3): NULL
----- ここまで -----
最後にこれまでの話などを考慮したパッチを作成しました。
実行時に libedit であれば index のオフセットを 0 に、
そうでない(GNU Readline であれば) オフセットを history_base に
設定するようにしています。
Mac OSX 10.5.4(昨日10.5.3からアップデートしました)の環境で、
動作を確認しています。
$ ~/local/bin/ruby19trunk -rreadline -ve 'puts Readline::VERSION; Readline::HISTORY.push("1", "2", "3"); Readline::HISTORY.each { |s| puts s }; p Readline::HISTORY[1]; Readline::HISTORY[1] = "A" ; p Readline::HISTORY[1]; Readline::HISTORY.delete_at(0); p Readline::HISTORY[0]; p Readline::HISTORY.length; p Readline::HISTORY.pop; p Readline::HISTORY.pop; p Readline::HISTORY.pop; '
ruby 1.9.0 (2008-07-16 revision 18071) [i686-darwin9.4.0]
EditLine wrapper
1
2
3
"2"
"A"
"A"
2
"3"
"A"
nil
----- ここから -----
Index: ext/readline/readline.c
===================================================================
--- ext/readline/readline.c (revision 18084)
+++ ext/readline/readline.c (working copy)
@@ -43,6 +43,8 @@
# define rl_completion_matches completion_matches
#endif
+static int history_offset = 0;
+
static char **readline_attempted_completion_function(const char *text,
int start, int end);
@@ -516,7 +518,7 @@
if (i < 0) {
i += history_length;
}
- entry = history_get(history_base + i);
+ entry = history_get(i + history_offset);
if (entry == NULL) {
rb_raise(rb_eIndexError, "invalid index");
}
@@ -536,7 +538,7 @@
if (i < 0) {
i += history_length;
}
- entry = replace_history_entry(i, RSTRING_PTR(str), NULL);
+ entry = replace_history_entry(i + history_offset, RSTRING_PTR(str), NULL);
if (entry == NULL) {
rb_raise(rb_eIndexError, "invalid index");
}
@@ -578,7 +580,7 @@
VALUE val;
rb_secure(4);
- entry = remove_history(index);
+ entry = remove_history(index + history_offset);
if (entry) {
val = rb_tainted_str_new2(entry->line);
free(entry->line);
@@ -624,7 +626,7 @@
rb_secure(4);
for (i = 0; i < history_length; i++) {
- entry = history_get(history_base + i);
+ entry = history_get(i + history_offset);
if (entry == NULL)
break;
rb_yield(rb_tainted_str_new2(entry->line));
@@ -795,6 +797,10 @@
rb_define_const(mReadline, "USERNAME_COMPLETION_PROC", ucomp);
#if defined HAVE_RL_LIBRARY_VERSION
rb_define_const(mReadline, "VERSION", rb_str_new2(rl_library_version));
+ if (strncmp(rl_library_version, "EditLine wrapper",
+ strlen("EditLine wrapper")) != 0) {
+ history_offset = history_base;
+ }
#else
rb_define_const(mReadline, "VERSION", rb_str_new2("2.0 or prior version"));
#endif