Skip to content

Commit

Permalink
Add reference manual of Set#select!
Browse files Browse the repository at this point in the history
According to https://github.com/ruby/ruby/tree/v1_9_2_381, this method was added as a new method to Ruby 1.9.2.
The reference manual of Ruby 1.9.2 and later versions will show the method with this change.
  • Loading branch information
monkey-mas committed Sep 5, 2013
1 parent b6a21e4 commit 11fb708
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion refm/api/src/set.rd
Expand Up @@ -537,9 +537,13 @@ o1 と o2 は同じ分割に属します。

#@since 1.9.2
--- keep_if {|o| ... } -> self

--- select! {|o| ... } -> self | nil
集合の各要素に対してブロックを実行し、その結果が偽であるようなすべての要素を削除します。

keep_if は常に self を返します。

select! は、要素が 1 つ以上削除されれば self を、1 つも削除されなければ
nil を返します。
#@end

= class SortedSet < Set
Expand Down

0 comments on commit 11fb708

Please sign in to comment.