diff options
Diffstat (limited to 'lib/kgio.rb')
-rw-r--r-- | lib/kgio.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/kgio.rb b/lib/kgio.rb index f192074..2b420b0 100644 --- a/lib/kgio.rb +++ b/lib/kgio.rb @@ -17,14 +17,20 @@ module Kgio # :wait_writable when waiting for a read is required. WaitWritable = :wait_writable - # autopush is no-op nowadays + # autopush is strongly not recommended nowadays, use MSG_MORE instead @autopush = false class << self - attr_accessor :autopush # :nodoc: + attr_reader :autopush # :nodoc: def autopush? # :nodoc: !!@autopush end + + def autopush=(bool) # :nodoc: + # No require_relative, we remain 1.8-compatible + require 'kgio/autopush' + @autopush = bool + end end end |