lib/ole/support.rb in ruby-ole-1.2.12.1 vs lib/ole/support.rb in ruby-ole-1.2.12.2
- old
+ new
@@ -133,10 +133,10 @@
# streams a "tree" form of the recursively enumerable structure to +io+, or
# return a string form instead if +io+ is not specified.
#
# mostly a debugging aid. can specify a different block which will be called
# to provide the string form for each node.
- def to_tree io='', &inspect
+ def to_tree io=''.dup, &inspect
inspect ||= :inspect.to_proc
io << "- #{inspect[self]}\n"
recurse = proc do |node, prefix|
child = nil
node.each_child do |next_child|