Permalink
Browse files

Remove Dirent#children=.

Only had one caller, and was subtly broken for general use due to not
clearing @name_lookup.
  • Loading branch information...
1 parent 63976a2 commit 84fde6402ca259f4d4a1896d56a46282ee7f4a36 @aquasync committed Jul 3, 2012
Showing with 1 addition and 6 deletions.
  1. +1 −6 lib/ole/storage/base.rb
View
7 lib/ole/storage/base.rb
@@ -135,7 +135,7 @@ class << @dirents
def to_tree idx=0
return [] if idx == Dirent::EOT
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
d.idx = idx
to_tree(d.prev) + [d] + to_tree(d.next)
@@ -786,11 +786,6 @@ def name= name
@name = name
end
- def children= children
- @children = []
- children.each { |child| self << child }
- end
-
def open mode='r'
raise Errno::EISDIR unless file?
io = RangesIOMigrateable.new self, mode

0 comments on commit 84fde64

Please sign in to comment.