Project

General

Profile

Feature #5970

Add Enumerable#join with same semantics as Array#join

Added by now (Nikolai Weibull) over 5 years ago. Updated almost 5 years ago.

Status:
Assigned
Priority:
Normal
Target version:
[ruby-core:42357]

Description

Currently, to join the elements of an Enumerable, you need to call #to_a on the Enumerable and then #join the result. With Enumerable#join one wouldn’t need need to create an intermediate Array.

enumerable_join.patch (5.42 KB) enumerable_join.patch zzak (Zachary Scott), 11/19/2012 08:26 AM

Related issues

Has duplicate Ruby trunk - Feature #7226: Add Set#join method as a shortcut for to_a.joinRejected2012-10-28

History

#1 [ruby-core:43877] Updated by mame (Yusuke Endoh) over 5 years ago

  • Status changed from Open to Assigned
  • Assignee set to matz (Yukihiro Matsumoto)

#2 [ruby-core:43932] Updated by shugo (Shugo Maeda) over 5 years ago

now (Nikolai Weibull) wrote:

Currently, to join the elements of an Enumerable, you need to call #to_a on the Enumerable and then #join the result. With Enumerable#join one wouldn’t need need to create an intermediate Array.

Once Enumerable#join had been added, and was removed later. See Bug #1893 ().

#3 [ruby-core:48513] Updated by shugo (Shugo Maeda) almost 5 years ago

  • Target version changed from 2.0.0 to next minor

Also available in: Atom PDF