diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-07-10 19:18:48 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-07-10 19:21:47 +0900 |
commit | c8d0470bb0888bcb6719ba536e5f3f6a8b6551bb (patch) | |
tree | 98536f216cd90b7987629c95b8d2f03f2ec9a3e6 /tool/lib | |
parent | 092c9b266ab3175c40a78e8af99bb82a0f3d2f4b (diff) | |
download | ruby-c8d0470bb0888bcb6719ba536e5f3f6a8b6551bb.tar.gz |
Use `File::NULL` instead of hard coded null device names
Diffstat (limited to 'tool/lib')
-rw-r--r-- | tool/lib/vcs.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tool/lib/vcs.rb b/tool/lib/vcs.rb index 650f275250..8566d72349 100644 --- a/tool/lib/vcs.rb +++ b/tool/lib/vcs.rb @@ -154,8 +154,7 @@ class VCS alias dryrun? dryrun alias debug? debug - NullDevice = defined?(IO::NULL) ? IO::NULL : - %w[/dev/null NUL NIL: NL:].find {|dev| File.exist?(dev)} + NullDevice = IO::NULL # returns # * the last revision of the current branch |