aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-13 06:26:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-13 06:26:30 +0000
commit081df640833fb4871048bcecffe61f110facd352 (patch)
tree8cf9347f856e702560eb98221f55c2f72a47c25f /file.c
parent83c961665def138e78a66d8bef0b4fa1da49ac69 (diff)
downloadruby-081df640833fb4871048bcecffe61f110facd352.tar.gz
file.c: chardev is loadable
* file.c (ruby_is_fd_loadable): allow character devices to load, e.g., `ruby /dev/null` exits successfully. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/file.c b/file.c
index 6aa7dfb720..12299adad6 100644
--- a/file.c
+++ b/file.c
@@ -5959,7 +5959,7 @@ ruby_is_fd_loadable(int fd)
if (S_ISREG(st.st_mode))
return 1;
- if (S_ISFIFO(st.st_mode))
+ if (S_ISFIFO(st.st_mode) || S_ISCHR(st.st_mode))
return -1;
if (S_ISDIR(st.st_mode))