diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-15 01:06:49 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-15 01:06:49 +0000 |
commit | caaf4f2aea6a63be691ced359c4ad85781fb60b8 (patch) | |
tree | 3d2d6c7ecb8ccf9ecfbf9033256b7ffe2957151e /test/io | |
parent | 9816f87815d27405e1f6c53ed20ad51bdca570ce (diff) | |
download | ruby-caaf4f2aea6a63be691ced359c4ad85781fb60b8.tar.gz |
io/console: move conditions
* test/io/console/test_io_console.rb: move conditions for method
definitions before the bodies.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/io')
-rw-r--r-- | test/io/console/test_io_console.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb index 36619cebd5..4876843555 100644 --- a/test/io/console/test_io_console.rb +++ b/test/io/console/test_io_console.rb @@ -7,6 +7,9 @@ rescue LoadError end class TestIO_Console < Test::Unit::TestCase +end + +defined?(PTY) and defined?(IO.console) and TestIO_Console.class_eval do Bug6116 = '[ruby-dev:45309]' def test_raw @@ -294,9 +297,9 @@ class TestIO_Console < Test::Unit::TestCase w.close if w Process.wait(pid) if pid end -end if defined?(PTY) and defined?(IO::console) +end -class TestIO_Console < Test::Unit::TestCase +defined?(IO.console) and TestIO_Console.class_eval do case when Process.respond_to?(:daemon) noctty = [EnvUtil.rubybin, "-e", "Process.daemon(true)"] @@ -335,9 +338,9 @@ class TestIO_Console < Test::Unit::TestCase t2.close! end end -end if defined?(IO.console) +end -class TestIO_Console < Test::Unit::TestCase +TestIO_Console.class_eval do def test_stringio_getch assert_separately %w"--disable=gems -rstringio -rio/console", %q{ assert_operator(StringIO, :method_defined?, :getch) |