Nobuyoshi Nakada
4/17/2007 3:47:00 PM
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