summaryrefslogtreecommitdiffstats
path: root/ext/io/wait/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-14 12:53:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-14 12:53:23 +0000
commit0405af45337488bc43f6efddb9d263d85bae4535 (patch)
treee2e0a04f2ae9a00e205c4d08a44b0823bd6937a2 /ext/io/wait/lib
parentf083d90798e86d1026a20daa196c0428993529d5 (diff)
downloadruby-0405af45337488bc43f6efddb9d263d85bae4535.tar.gz
ruby-0405af45337488bc43f6efddb9d263d85bae4535.tar.xz
ruby-0405af45337488bc43f6efddb9d263d85bae4535.zip
* ext/io/nonblock: moved from ext/io/wait/lib.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/io/wait/lib')
-rw-r--r--ext/io/wait/lib/nonblock.rb23
1 files changed, 0 insertions, 23 deletions
diff --git a/ext/io/wait/lib/nonblock.rb b/ext/io/wait/lib/nonblock.rb
deleted file mode 100644
index 2103fdf25..000000000
--- a/ext/io/wait/lib/nonblock.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-require "fcntl"
-class IO
- def nonblock?
- (fcntl(Fcntl::F_GETFL) & File::NONBLOCK) != 0
- end
-
- def nonblock=(nb)
- f = fcntl(Fcntl::F_GETFL)
- if nb
- f |= File::NONBLOCK
- else
- f &= ~File::NONBLOCK
- end
- fcntl(Fcntl::F_SETFL, f)
- end
-
- def nonblock(nb = true)
- nb, self.nonblock = nonblock?, nb
- yield
- ensure
- self.nonblock = nb
- end
-end if defined?(Fcntl::F_GETFL)