ruby-changes:59291
From: Masataka <ko1@a...>
Date: Tue, 17 Dec 2019 14:52:18 +0900 (JST)
Subject: [ruby-changes:59291] 8f52604b47 (master): Remove unnecessary double bangs from Pathname#root?
https://git.ruby-lang.org/ruby.git/commit/?id=8f52604b47 From 8f52604b478fee5243080116b8e62f0c1f5cb9a0 Mon Sep 17 00:00:00 2001 From: Masataka Pocke Kuwabara <kuwabara@p...> Date: Mon, 9 Dec 2019 00:48:13 +0900 Subject: Remove unnecessary double bangs from Pathname#root? diff --git a/ext/pathname/lib/pathname.rb b/ext/pathname/lib/pathname.rb index 2fd0642..dc4a7c0 100644 --- a/ext/pathname/lib/pathname.rb +++ b/ext/pathname/lib/pathname.rb @@ -207,7 +207,7 @@ class Pathname https://github.com/ruby/ruby/blob/trunk/ext/pathname/lib/pathname.rb#L207 # 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. -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/