From: Nobuyoshi Nakada Date: 2007-04-18T00:46:50+09:00 Subject: Re: How to redefine puts in .rbw files Hi, At Wed, 18 Apr 2007 00:19:23 +0900, Jano Svitok wrote in [ruby-talk:248234]: > Is there a slick ruby way to do this? e.g.: overload puts and > call the system puts within the overload within a begin rescue > end. The global "puts" calls STDOUT.write. def STDOUT.write(str) super rescue Errno::EBADF def self.write(str) end end -- Nobu Nakada