Project

General

Profile

Bug #3514 » pathname.patch

runpaint (Run Paint Run Run), 07/02/2010 04:38 AM

View differences:

lib/pathname.rb
def relative?
path = @path
while r = chop_basename(path)
path, basename = r
path, = r
end
path == ''
end
......
#
def each_filename # :yield: filename
return to_enum(__method__) unless block_given?
prefix, names = split_names(@path)
_, names = split_names(@path)
names.each {|filename| yield filename }
nil
end
......
path = @path
yield self
while r = chop_basename(path)
path, name = r
path, = r
break if path.empty?
yield self.class.new(del_trailing_separator(path))
end
(3-3/8)