From: nobu.nokada@... Date: 2001-10-25T10:12:31+09:00 Subject: [ruby-talk:23244] Re: Erroneous warning: block for Proc#call is useless Hi, At Thu, 25 Oct 2001 05:56:26 +0900, Bob Alexander wrote: > Ruby sometimes invalidly outputs the warning: > > sig.rb:10: warning: block for Proc#call is useless > > Some time ago I attempted to report this problem, but couldn't make a > simple test case to reproduce it. Well, it happened again and I got a > better handle on it this time -- it's related to signals. I'm using > version 1.6.5. Please try following patch. Index: eval.c =================================================================== RCS file: /cvs/ruby/src/ruby/eval.c,v retrieving revision 1.137.2.68 diff -u -2 -p -r1.137.2.68 eval.c --- eval.c 2001/10/16 15:17:09 1.137.2.68 +++ eval.c 2001/10/25 01:06:55 @@ -1361,7 +1361,9 @@ rb_trap_eval(cmd, sig) PUSH_TAG(PROT_NONE); + PUSH_ITER(ITER_NOT); if ((state = EXEC_TAG()) == 0) { val = rb_eval_cmd(cmd, rb_ary_new3(1, INT2FIX(sig))); } + POP_ITER(); POP_TAG(); if (state) { Nobu Nakada