From c448ad898ecb7f354a32a320294da4727fc9af52 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 7 Oct 2010 19:55:49 -0700 Subject: [PATCH] make WaitWritable and WaitReadable symbols This makes them easier to compare with === when used in case/when statements in Ruby --- lib/kgio.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/kgio.rb b/lib/kgio.rb index ae7eac8..2ff366e 100644 --- a/lib/kgio.rb +++ b/lib/kgio.rb @@ -6,15 +6,15 @@ module Kgio # Rack (and CGI) servers that also serve HTTP traffic over # UNIX domain sockets. LOCALHOST = '127.0.0.1' -end -# Kgio::PipeMethods#kgio_tryread and Kgio::SocketMethods#kgio_tryread will -# return this constant when waiting for a read is required. -module Kgio::WaitReadable; end + # Kgio::PipeMethods#kgio_tryread and Kgio::SocketMethods#kgio_tryread will + # return this constant when waiting for a read is required. + WaitReadable = :wait_readable -# PipeMethods#kgio_trywrite and SocketMethods#kgio_trywrite will -# return this constant when waiting for a read is required. -module Kgio::WaitWritable; end + # PipeMethods#kgio_trywrite and SocketMethods#kgio_trywrite will + # return this constant when waiting for a read is required. + WaitWritable = :wait_writable +end require 'kgio_ext' -- 2.11.4.GIT