mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/set.rb: each() should return self.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
dbe85f1ef0
commit
e4ffaf6ea8
2 changed files with 5 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Mon Jul 28 03:08:47 2003 Akinori MUSHA <knu@iDaemons.org>
|
||||||
|
|
||||||
|
* lib/set.rb: each() should return self.
|
||||||
|
|
||||||
Mon Jul 28 01:35:32 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Mon Jul 28 01:35:32 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* string.c (rb_str_chomp_bang): defer rb_str_modify() to actual
|
* string.c (rb_str_chomp_bang): defer rb_str_modify() to actual
|
||||||
|
|
|
@ -178,6 +178,7 @@ class Set
|
||||||
# the element as parameter.
|
# the element as parameter.
|
||||||
def each
|
def each
|
||||||
@hash.each_key { |o| yield(o) }
|
@hash.each_key { |o| yield(o) }
|
||||||
|
self
|
||||||
end
|
end
|
||||||
|
|
||||||
# Adds the given object to the set and returns self.
|
# Adds the given object to the set and returns self.
|
||||||
|
|
Loading…
Reference in a new issue