File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1342,19 +1342,24 @@ class Pathname # * FileTest *
13421342 # The returned value is OS-dependent; on Windows, almost always `false`.
13431343 def blockdev? ( ) FileTest . blockdev? ( @path ) end
13441344
1345+ # :markup: markdown
1346+ #
13451347 # call-seq:
13461348 # chardev? => true or false
13471349 #
1348- # Returns whether + self+ represents a character device
1350+ # Returns whether ` self` represents a path to a character device
13491351 # (i.e., a sequential-access device):
13501352 #
1351- # Pathname.new('/dev/tty').chardev? # => true
1352- # Pathname.new('/dev/null').chardev? # => true
1353- # Pathname.new('/dev/nvme0n1').chardev? # => false
1354- # Pathname.new('/dev/loop0').chardev? # => false
1355- # Pathname.new('nosuch').chardev? # => false
1356- #
1357- # The returned value is OS-dependent; on Windows, almost always +false+.
1353+ # ```ruby
1354+ # Pathname('/dev/tty').chardev? # => true
1355+ # Pathname('/dev/null').chardev? # => true
1356+ # Pathname('/dev/nvme0n1').chardev? # => false
1357+ # Pathname('/dev/loop0').chardev? # => false
1358+ # Pathname($stdin).chardev? # => false
1359+ # Pathname('nosuch').chardev? # => false
1360+ # ```
1361+ #
1362+ # The returned value is OS-dependent; on Windows, almost always `false`.
13581363 def chardev? ( ) FileTest . chardev? ( @path ) end
13591364
13601365 # Tests the file is empty.
You can’t perform that action at this time.
0 commit comments