< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事(スレッド移動)
N :次の記事(スレッド移動)
|<:前のスレッド
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
Issue #13102 has been updated by Stefan Schler.
I was referring to the use of bang [method names](http://ruby-doc.org/core-2.4.0/doc/syntax/methods_rdoc.html#label-Method+Names) in the Ruby core library:
> [...] In ruby core library the dangerous method implies that when a method ends with a bang (`!`), it indicates that unlike its non-bang equivalent, permanently modifies its receiver. Almost always, ruby core library will have a non-bang counterpart (method name which does NOT end with `!`) of every bang method (method name which does end with `!`) that does not modify the receiver. This convention is typically true for ruby core library but may or may not hold true for other ruby libraries.
----------------------------------------
Bug #13102: Confusing method name: Set#delete?
https://bugs.ruby-lang.org/issues/13102#change-63009
* Author: Kai Kuchenbecker
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: 2.4.0
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
Greetings,
a colleague of mine who recently started to learn Ruby managed to greatly confuse me today when he used Set#delete? which he claimed would delete an item from a set.
Reading the documentation I suspect the method was meant to be named delete! as it behaves similiar to Array#uniq! and such methods.
If this is not a mistake, I'd still suggest to change the method name since I think it is very surprising for a method ending in a question mark to have a side effect.
Best regards,
Kai
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>