Skip to content

Commit

Permalink
Remove Dirent#children=.
Browse files Browse the repository at this point in the history
Only had one caller, and was subtly broken for general use due to not
clearing @name_lookup.
  • Loading branch information
aquasync committed Jul 3, 2012
1 parent 63976a2 commit 84fde64
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/ole/storage/base.rb
Expand Up @@ -135,7 +135,7 @@ class << @dirents
def to_tree idx=0 def to_tree idx=0
return [] if idx == Dirent::EOT return [] if idx == Dirent::EOT
d = self[idx] d = self[idx]
d.children = to_tree d.child to_tree(d.child).each { |child| d << child }
raise FormatError, "directory #{d.inspect} used twice" if d.idx raise FormatError, "directory #{d.inspect} used twice" if d.idx
d.idx = idx d.idx = idx
to_tree(d.prev) + [d] + to_tree(d.next) to_tree(d.prev) + [d] + to_tree(d.next)
Expand Down Expand Up @@ -786,11 +786,6 @@ def name= name
@name = name @name = name
end end


def children= children
@children = []
children.each { |child| self << child }
end

def open mode='r' def open mode='r'
raise Errno::EISDIR unless file? raise Errno::EISDIR unless file?
io = RangesIOMigrateable.new self, mode io = RangesIOMigrateable.new self, mode
Expand Down

0 comments on commit 84fde64

Please sign in to comment.