https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112012-07-14T15:39:04ZRuby Issue Tracking SystemRuby master - Feature #6731: add new method "Object.present?" as a counter to #empty?https://redmine.ruby-lang.org/issues/6731?journal_id=280422012-07-14T15:39:04Zrogerdpack (Roger Pack)rogerpack2005@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/2897">present.txt</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2897/present.txt">present.txt</a> added</li></ul><p>Adding "presentation" txt file.</p> Ruby master - Feature #6731: add new method "Object.present?" as a counter to #empty?https://redmine.ruby-lang.org/issues/6731?journal_id=281622012-07-17T07:53:10Zclaytrump (Clay Trump)clay.trump@gmail.com
<ul></ul><p>Hum, wouldn't this conflict with Rails? In Rails, " ".present? is<br>
falseclass Object</p>
<blockquote>
<p>def present?<br>
!(respond_to?(:empty?) ? empty? : !self)<br>
end</p>
<p>end</p>
<p>--</p>
</blockquote>
Ruby master - Feature #6731: add new method "Object.present?" as a counter to #empty?https://redmine.ruby-lang.org/issues/6731?journal_id=283922012-07-24T22:37:50Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Rejected</i></li></ul><p>Roger Pack,</p>
<p>Sorry but this proposal was rejected at the developer meeting (7/21).</p>
<p>There are many possible definitions of "present?" depending upon<br>
contexts. It's not Ruby's decision. People should decide the<br>
definition for their context.</p>
<p>--<br>
Yusuke Endoh <a href="mailto:mame@tsg.ne.jp" class="email">mame@tsg.ne.jp</a></p>