aboutsummaryrefslogtreecommitdiffstats
path: root/ext/pathname
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-10 12:04:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-10 12:04:24 +0000
commit6e2c124ee8ecd3d7e4e44010105e9139bdf0711d (patch)
treeddde6a58e1de144ef4f43cef7fdbc1349ce0bd3f /ext/pathname
parent9e49b57f2620a3b1e8c240797980ff3d9e94ba91 (diff)
downloadruby-6e2c124ee8ecd3d7e4e44010105e9139bdf0711d.tar.gz
Pathname: Simplified Pathname#mountpoint?
Removed unnecessary comparison in mountpoint? [Fix GH-1927] From: John Whitson <john.whitson@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/pathname')
-rw-r--r--ext/pathname/lib/pathname.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/pathname/lib/pathname.rb b/ext/pathname/lib/pathname.rb
index da5c661e3e..3baf818f08 100644
--- a/ext/pathname/lib/pathname.rb
+++ b/ext/pathname/lib/pathname.rb
@@ -193,8 +193,7 @@ class Pathname
begin
stat1 = self.lstat
stat2 = self.parent.lstat
- stat1.dev == stat2.dev && stat1.ino == stat2.ino ||
- stat1.dev != stat2.dev
+ stat1.dev != stat2.dev || stat1.ino == stat2.ino
rescue Errno::ENOENT
false
end