aboutsummaryrefslogtreecommitdiffstats
path: root/lib/pathname.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pathname.rb')
-rw-r--r--lib/pathname.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pathname.rb b/lib/pathname.rb
index c81a70562b..87c496107c 100644
--- a/lib/pathname.rb
+++ b/lib/pathname.rb
@@ -492,7 +492,8 @@ class Pathname
# # yields "usr", "bin", and "ruby".
#
def each_filename # :yield: s
- split_names(@path).each {|filename| yield filename }
+ prefix, names = split_names(@path)
+ names.each {|filename| yield filename }
end
# Iterates over and yields a new Pathname object