diff options
Diffstat (limited to 'ext/pathname/lib/pathname.rb')
-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 a6621565d0..8bdb73f439 100644 --- a/ext/pathname/lib/pathname.rb +++ b/ext/pathname/lib/pathname.rb @@ -378,7 +378,7 @@ class Pathname basename_list2.shift end r1 = chop_basename(prefix1) - if !r1 && /#{SEPARATOR_PAT}/o =~ File.basename(prefix1) + if !r1 && (r1 = /#{SEPARATOR_PAT}/o =~ File.basename(prefix1)) while !basename_list2.empty? && basename_list2.first == '..' index_list2.shift basename_list2.shift |