summaryrefslogtreecommitdiff
path: root/lib/un.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-22 00:05:55 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-22 00:05:55 +0000
commitd0a4131709edc8d3fda4ab6d0212b26856213c8b (patch)
treef4ba257c83a565bb0b48c2257113ddb442ffde53 /lib/un.rb
parentcc367fb32689bf94a20c136519d537660084ae56 (diff)
un.rb: suppress warning
* lib/un.rb (wait_writable): show error messages only if -v is given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/un.rb')
-rw-r--r--lib/un.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/un.rb b/lib/un.rb
index e06e0e759b..2f2d3e21be 100644
--- a/lib/un.rb
+++ b/lib/un.rb
@@ -246,8 +246,10 @@ def wait_writable
break
rescue Errno::EACCES => e
raise if n and (n -= 1) <= 0
- puts e
- STDOUT.flush
+ if verbose
+ puts e
+ STDOUT.flush
+ end
sleep wait
retry
end