Matz replied: > |What exactly does Ruby's warning message > | > | "warning: block for Proc#call is useless" > | > |mean? > > You might expect > > p = Proc::new{ yield 55 } > p.call{|x| p x} > > to print 55, but it won't, but you'll get this warning. Because Proc > object themselves have already captured the context including the > block of the place where Proc was created, so that invoking "call" > with block cause warning. Ah, yes -- that makes perfect sense -- thanks for the clarification. But the warning doesn't seem to fit the code where it is occuring. There are no explicit Proc#call operations in the program, nor are there any '&' parameters or 'yield' method calls. Here is the code fragment again, with the line marked where the warning occurs. I'm hoping someone has a clue as to why this is happening. The surrounding code is included just to provide context. Note that the warning does not occur every time this code executes -- only occasionally, and I haven't figured out a pattern yet. The code appears to execute correctly despite the warning, though. # # Lock the queue and get header data. # openQueue(true) # # Look for an entry in the in-process set which has no "owner". # begin Dir.foreach(@inProcessDir) do |inProcessName| <<<<<<< HERE next if inProcessName == '.' || inProcessName == '..' inProcessPath = File.join(@inProcessDir, inProcessName) if inProcessFile = openAndLock(inProcessPath, "r+", File::LOCK_EX | File::LOCK_NB, true) entry = inProcessFile.read() unless inProcess File.delete(inProcessPath) inProcessFile.close() end @inProcessFile = inProcessFile closeQueue() @wasInProcess = true return entry end end rescue Errno::ENOENT end Bob