From: Akinori MUSHA Date: 2007-03-11T18:03:40+09:00 Subject: [ruby-dev:30525] Re: DL::Symbol#call dumps core --pgp-sign-Multipart_Sun_Mar_11_18:03:38_2007-1 Content-Type: text/plain; charset=ISO-2022-JP At Sun, 11 Mar 2007 12:09:59 +0900, sheepman wrote: > dl(1.8に付属の方)のマニュアルを書いていて気がついたんですが、 > 次のようにすると core を吐きます。 > > strlast = DL.callback('IS'){|s| > s[-1] > } > p strlast.call("abcd")[0].chr > DL.remove_callback(strlast) > p strlast.call("abcd")[0].chr > > $ ruby-1.8 -vrdl/import t.rb > ruby 1.8.6 (2007-03-05 patchlevel 5000) [i686-linux] > "d" > t.rb:9: [BUG] Segmentation fault > ruby 1.8.6 (2007-03-05) [i686-linux] > > zsh: abort ruby-1.8 -vrdl/import t.rb > > 以下はパッチです。  ありがとうございます。エラーメッセージだけ修正してコミット しました。  1.9 の方(DL2)は該当部分がないのでそのままです。上のコードも 動きませんが、互換レイヤがないと移行がつらいかもしれませんね。 -- / /__ __ Akinori.org / MUSHA.org / ) ) ) ) / FreeBSD.org / Ruby-lang.org Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp "Different eyes see different things, Different hearts beat on different strings -- But there are times for you and me when all such things agree" --pgp-sign-Multipart_Sun_Mar_11_18:03:38_2007-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQBF88Xqkgvvx5/Z4e4RAvFBAJ90INHD/yc2EZz0YQBk4sbGBMg67ACgr65n 92L/QDMPLaKpqnU6SPvz8Bw= =LLpF -----END PGP SIGNATURE----- --pgp-sign-Multipart_Sun_Mar_11_18:03:38_2007-1--