diff options
author | Masataka Pocke Kuwabara <kuwabara@pocke.me> | 2019-12-09 00:48:13 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-12-17 14:14:54 +0900 |
commit | 8f52604b478fee5243080116b8e62f0c1f5cb9a0 (patch) | |
tree | 5684fd8ecb3452650f8058dc1f23bb004ec398d9 /ext/pathname | |
parent | 9421c7804191b73aa9fde8f14235b3a1f37ffd4b (diff) |
Remove unnecessary double bangs from Pathname#root?
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2732
Diffstat (limited to 'ext/pathname')
-rw-r--r-- | ext/pathname/lib/pathname.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pathname/lib/pathname.rb b/ext/pathname/lib/pathname.rb index 2fd0642e14..dc4a7c0220 100644 --- a/ext/pathname/lib/pathname.rb +++ b/ext/pathname/lib/pathname.rb @@ -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. |