https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112018-04-27T21:24:57ZRuby Issue Tracking SystemRuby master - Bug #14719: FalseClass wrapped in a SimpleDelegator evaluates to true in an IF statementhttps://bugs.ruby-lang.org/issues/14719?journal_id=716922018-04-27T21:24:57Zmarcandre (Marc-Andre Lafortune)marcandre-ruby-core@marc-andre.ca
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Rejected</i></li></ul><p>I'm afraid you can not achieve what you want to achieve in Ruby. The only two objects that are falsy in Ruby are <code>nil</code> and <code>false</code>. No other object can "look" like <code>false</code>. This is by design and can not be changed.</p> Ruby master - Bug #14719: FalseClass wrapped in a SimpleDelegator evaluates to true in an IF statementhttps://bugs.ruby-lang.org/issues/14719?journal_id=717282018-04-30T09:05:50Ztheirishpenguin (Declan McGrath)
<ul></ul><p>Thanks Marc-Andre. Appreciate the quick response.</p> Ruby master - Bug #14719: FalseClass wrapped in a SimpleDelegator evaluates to true in an IF statementhttps://bugs.ruby-lang.org/issues/14719?journal_id=717292018-04-30T09:06:22Ztheirishpenguin (Declan McGrath)
<ul><li><strong>Subject</strong> changed from <i>FalseClass wrapping a SimpleDelegator evaluates to true in an IF statement</i> to <i>FalseClass wrapped in a SimpleDelegator evaluates to true in an IF statement</i></li></ul>