Hacker News new | ask | show | jobs
by barrkel 4113 days ago
I believe it's in the Gem::Specification.traverse method here:

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.

1 comments

    trail = trail + [self]
That + operator looks so innocent, so seductively simple..