https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112016-07-25T01:55:22ZRuby Issue Tracking SystemRuby master - Feature #12625: TypeError.assert, ArgumentError.asserthttps://redmine.ruby-lang.org/issues/12625?journal_id=597862016-07-25T01:55:22Zshyouhei (Shyouhei Urabe)shyouhei@ruby-lang.org
<ul></ul><p>I'm not sure wether I should be for this one or !==, but at least I can agree that <code>raise TypeError unless SomeClass === arg</code> is an idiom. I also experienced this before.</p> Ruby master - Feature #12625: TypeError.assert, ArgumentError.asserthttps://redmine.ruby-lang.org/issues/12625?journal_id=597872016-07-25T06:04:10Zakhramov (Artem Khramov)futu.fata@gmail.com
<ul></ul><p>Hi. It sounds like design-by-contract programming for me.</p>
<p>There are a few gems you might want to take a look at.</p>
<p><a href="https://github.com/egonSchiele/contracts.ruby" class="external">For instance</a></p> Ruby master - Feature #12625: TypeError.assert, ArgumentError.asserthttps://redmine.ruby-lang.org/issues/12625?journal_id=600392016-08-10T04:36:37Zshyouhei (Shyouhei Urabe)shyouhei@ruby-lang.org
<ul></ul><p>See also <a class="issue tracker-2 status-6 priority-4 priority-default closed" title="Feature: !== (other) (Rejected)" href="https://redmine.ruby-lang.org/issues/12624">#12624</a>, Matz do not want assertion by class.</p>