[前][次][番号順一覧][スレッド一覧]

ruby-changes:38172

From: akr <ko1@a...>
Date: Sun, 12 Apr 2015 10:33:36 +0900 (JST)
Subject: [ruby-changes:38172] akr:r50253 (trunk): Consider more block devices.

akr	2015-04-12 10:33:19 +0900 (Sun, 12 Apr 2015)

  New Revision: 50253

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50253

  Log:
    Consider more block devices.

  Modified files:
    trunk/test/ruby/test_file_exhaustive.rb
Index: test/ruby/test_file_exhaustive.rb
===================================================================
--- test/ruby/test_file_exhaustive.rb	(revision 50252)
+++ test/ruby/test_file_exhaustive.rb	(revision 50253)
@@ -160,11 +160,7 @@ class TestFileExhaustive < Test::Unit::T https://github.com/ruby/ruby/blob/trunk/test/ruby/test_file_exhaustive.rb#L160
   def blockdev
     return @blockdev if defined? @blockdev
     if /linux/ =~ RUBY_PLATFORM
-      if File.exist? '/dev/loop0'
-        @blockdev = '/dev/loop0'
-      elsif File.exist? '/dev/sda'
-        @blockdev = '/dev/sda'
-      end
+      @blockdev = %w[/dev/loop0 /dev/sda /dev/vda /dev/xvda1].find {|f| File.exist? f }
     else
       @blockdev = nil
     end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]