aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_dir.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-04 15:54:04 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-04 15:54:04 +0000
commitd03315d84a0ac639f80b5c0d499c1c662be66c55 (patch)
tree8ec01d9e0742cbf5c2fc871d327eba12dd8c36b0 /test/ruby/test_dir.rb
parentf20d51b0adb640c9351b3025e6dda7843c3342aa (diff)
downloadruby-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/test_dir.rb')
-rw-r--r--test/ruby/test_dir.rb10
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