# frozen_string_literal: true require 'test/unit' require '-test-/thread_fd' require 'io/wait' class TestThreadFdClose < Test::Unit::TestCase def test_thread_fd_close IO.pipe do |r, w| th = Thread.new do begin assert_raise(IOError) { r.read(4) } ensure w.syswrite('done') end end Thread.pass until th.stop? IO.thread_fd_close(r.fileno) assert_equal 'done', r.read(4) th.join end end end nput type='hidden' name='id' value='c749e4fca225cd00f5be15f6fe6e4538a6c29413'/> The Ruby Programming Language
summaryrefslogtreecommitdiff
path: root/vm.c
AgeCommit message (Expand)Author
2009-07-07* include/ruby/ruby.h:ko1
2009-07-07* vm.c ({env,vm,thread}_data_type): constified.nobu
2009-06-22* compile.c (iseq_set_arguments, iseq_compile_each): internalnobu
2009-06-16* iseq.c (iseq_memsize): added. Use RTypedData instead of RDatako1
2009-05-17* ruby.c (ruby_script): sets also VM toplevel program name.nobu
2009-05-17* vm.c (rb_vm_get_sourceline): should not access out of bound.nobu
2009-05-13* gc.c: add longlife garbage collection. [ruby-dev:38423]nari