summaryrefslogtreecommitdiff
path: root/ext
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
commit74325360d3be2db1b707470b5e831334dd0f39bf (patch)
treeddde6a58e1de144ef4f43cef7fdbc1349ce0bd3f /ext
parentd370a3d44cc353bae33ffaa622d4117ea45932fb (diff)
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')
-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 da5c661..3baf818 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