diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-04 15:54:04 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-04 15:54:04 +0000 |
commit | d03315d84a0ac639f80b5c0d499c1c662be66c55 (patch) | |
tree | 8ec01d9e0742cbf5c2fc871d327eba12dd8c36b0 /test/ruby | |
parent | f20d51b0adb640c9351b3025e6dda7843c3342aa (diff) | |
download | ruby-d03315d84a0ac639f80b5c0d499c1c662be66c55.tar.gz |
* configure.in (dirfd): Check function.
* dir.c (dir_fileno): New method.
[ruby-dev:48265] [Feature #9880]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_dir.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_dir.rb b/test/ruby/test_dir.rb index 4ce3944cfc..ee1210cc37 100644 --- a/test/ruby/test_dir.rb +++ b/test/ruby/test_dir.rb @@ -294,4 +294,14 @@ class TestDir < Test::Unit::TestCase end end end + + def test_fileno + Dir.open(".") {|d| + if d.respond_to? :fileno + assert_kind_of(Integer, d.fileno) + else + assert_raise(NotImplementedError) { d.fileno } + end + } + end end |