* file.c (rb_io_statfs): need to define even if the system doesn't have
fstatfs(2). * test/ruby/test_file.rb (TestFile#test_statfs): skip if IO#stafs is not implemented. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3b1862e62f
commit
026b0b9469
@ -1,3 +1,11 @@
|
||||
Tue Apr 22 22:15:51 2014 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* file.c (rb_io_statfs): need to define even if the system doesn't have
|
||||
fstatfs(2).
|
||||
|
||||
* test/ruby/test_file.rb (TestFile#test_statfs): skip if IO#stafs is not
|
||||
implemented.
|
||||
|
||||
Tue Apr 22 19:32:48 2014 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* file.c: newly added a class File::Statfs. (experimental)
|
||||
|
2
file.c
2
file.c
@ -1125,6 +1125,8 @@ rb_io_statfs(VALUE obj)
|
||||
}
|
||||
return rb_statfs_new(&st);
|
||||
}
|
||||
#else
|
||||
#define rb_io_statfs rb_f_notimplement
|
||||
#endif
|
||||
|
||||
static int
|
||||
|
@ -385,6 +385,7 @@ class TestFile < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def test_statfs
|
||||
skip "not implemented" unless $stdout.respond_to?(:statfs)
|
||||
open(__FILE__) do |f|
|
||||
st = f.statfs
|
||||
assert_kind_of File::Statfs, st
|
||||
|
Loading…
x
Reference in New Issue
Block a user