mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/webrick/server.rb: use IO::NULL instead of '/dev/null'
* test/ruby/test_string.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a20929cb72
commit
2ded8d0698
3 changed files with 9 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Aug 27 18:05:42 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
|
||||
|
||||
* lib/webrick/server.rb: use IO::NULL instead of '/dev/null'
|
||||
* test/ruby/test_string.rb: ditto.
|
||||
|
||||
Thu Aug 27 15:24:57 2015 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* compile.c (iseq_set_sequence): rename variable names
|
||||
|
|
|
@ -48,9 +48,9 @@ module WEBrick
|
|||
exit!(0) if fork
|
||||
Dir::chdir("/")
|
||||
File::umask(0)
|
||||
STDIN.reopen("/dev/null")
|
||||
STDOUT.reopen("/dev/null", "w")
|
||||
STDERR.reopen("/dev/null", "w")
|
||||
STDIN.reopen(IO::NULL)
|
||||
STDOUT.reopen(IO::NULL, "w")
|
||||
STDERR.reopen(IO::NULL, "w")
|
||||
yield if block_given?
|
||||
end
|
||||
end
|
||||
|
|
|
@ -464,8 +464,7 @@ class TestString < Test::Unit::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
null = File.exist?("/dev/null") ? "/dev/null" : "NUL" # maybe DOSISH
|
||||
assert_equal("", File.read(null).clone, '[ruby-dev:32819] reported by Kazuhiro NISHIYAMA')
|
||||
assert_equal("", File.read(IO::NULL).clone, '[ruby-dev:32819] reported by Kazuhiro NISHIYAMA')
|
||||
end
|
||||
|
||||
def test_concat
|
||||
|
|
Loading…
Reference in a new issue