Skip to content

Added #join method as a shortcut for to_a.join #207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Sat Oct 27 17:32:23 2012 Nathan Broadbent <nathan.f77@gmail.com>

* lib/set.rb: Added #join method as a shortcut for to_a.join

Fri Oct 12 18:18:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>

* file.c (rb_get_path_check): path name must not contain NUL bytes.
Expand Down
4 changes: 4 additions & 0 deletions lib/set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ def to_a
@hash.keys
end

def join(sep = nil)
to_a.join(sep)
end

def flatten_merge(set, seen = Set.new) # :nodoc:
set.each { |e|
if e.is_a?(Set)
Expand Down