Skip to content

[doc] errors on Core:Enumerable#commonality #5

@chikamichi

Description

@chikamichi

The block code in the doc for this method is erroneous.
http://facets.rubyforge.org/apidoc/api/core/classes/Enumerable.html#M000511

From an irb session:


ruby-1.9.1-p378 > [1, 2, 2, 3, 4, 4].commonality
 => {2=>[2, 2], 4=>[4, 4]} 
ruby-1.9.1-p378 > ["foo", "bar", "a"].commonality { |str| str.length }
 => {3=>["foo", "bar"]}

The collision method mentionned in the doc doesn't seem to be an existing alias of commonality (could be interesting to add it though!).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions