1
0
Fork 0
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:
Masataka Pocke Kuwabara 2019-12-09 00:48:13 +09:00 committed by 卜部昌平
parent 9421c78041
commit 8f52604b47
Notes: git 2019-12-17 14:15:18 +09:00

View file

@ -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.