Rubyで !! という二重否定を単項演算子として使う理由は? def foo? !!bar end というイディオムの意味は?という質問。 たしかに、Ruby では false と nil 以外は true なのですが、? メソッドで boolean 以外のオブジェクトが返るのも違和感があるため、メ…
Quote saved.
Login to quote this blog
Failed to save quote. Please try again later.
You cannot quote because this article is private.