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>
|
Thu Aug 27 15:24:57 2015 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* compile.c (iseq_set_sequence): rename variable names
|
* compile.c (iseq_set_sequence): rename variable names
|
||||||
|
|
|
@ -48,9 +48,9 @@ module WEBrick
|
||||||
exit!(0) if fork
|
exit!(0) if fork
|
||||||
Dir::chdir("/")
|
Dir::chdir("/")
|
||||||
File::umask(0)
|
File::umask(0)
|
||||||
STDIN.reopen("/dev/null")
|
STDIN.reopen(IO::NULL)
|
||||||
STDOUT.reopen("/dev/null", "w")
|
STDOUT.reopen(IO::NULL, "w")
|
||||||
STDERR.reopen("/dev/null", "w")
|
STDERR.reopen(IO::NULL, "w")
|
||||||
yield if block_given?
|
yield if block_given?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -464,8 +464,7 @@ class TestString < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
null = File.exist?("/dev/null") ? "/dev/null" : "NUL" # maybe DOSISH
|
assert_equal("", File.read(IO::NULL).clone, '[ruby-dev:32819] reported by Kazuhiro NISHIYAMA')
|
||||||
assert_equal("", File.read(null).clone, '[ruby-dev:32819] reported by Kazuhiro NISHIYAMA')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_concat
|
def test_concat
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue