mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Remove unnecessary double bangs from Pathname#root?
This commit is contained in:
parent
9421c78041
commit
8f52604b47
Notes:
git
2019-12-17 14:15:18 +09:00
1 changed files with 1 additions and 1 deletions
|
@ -207,7 +207,7 @@ class Pathname
|
|||
# pathnames which points to roots such as <tt>/usr/..</tt>.
|
||||
#
|
||||
def root?
|
||||
!!(chop_basename(@path) == nil && /#{SEPARATOR_PAT}/o.match?(@path))
|
||||
chop_basename(@path) == nil && /#{SEPARATOR_PAT}/o.match?(@path)
|
||||
end
|
||||
|
||||
# Predicate method for testing whether a path is absolute.
|
||||
|
|
Loading…
Reference in a new issue