4 ms·
I'm not very familiar with Ruby; where exactly did the duplication occur in the original code?
by icebraining 12y ago
I'm not very familiar with Ruby; where exactly did the duplication occur in the original code?
- deleted 12y ago[deleted]
- barrkel 12y agoI believe it's in the Gem::Specification.traverse method here: http://ruby-doc.org/stdlib-1.9.3/libdoc/rubygems/rdoc/Gem/Specification.html#method-i-traverse http://ruby-doc.org/stdlib-1.9.3/libdoc/rubygems/rdoc/Gem/Sp... The 'trail' parameter, an array, was implicitly duplicated by applying the '+' operator on each recursion through a dependency.
- weavie 12y agotrail = trail + [self] That + operator looks so innocent, so seductively simple..