diff --git a/ChangeLog b/ChangeLog index 31cac1cb53a185..ee6e2e6eebea1c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sat Oct 27 17:32:23 2012 Nathan Broadbent + + * lib/set.rb: Added #join method as a shortcut for to_a.join + Fri Oct 12 18:18:03 2012 Nobuyoshi Nakada * file.c (rb_get_path_check): path name must not contain NUL bytes. diff --git a/lib/set.rb b/lib/set.rb index 87a941e56511e1..f71727d5e153d9 100755 --- a/lib/set.rb +++ b/lib/set.rb @@ -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)