snipt

Ctrl+h for KB shortcuts

Smalltalk

very convenient for return values

1
2
3
Object>isntNil
    self assert: self notNil.
    ^ self
https://snipt.net/embed/b4c6f4562e413ce643e58686703b20dc/
https://snipt.net/raw/b4c6f4562e413ce643e58686703b20dc/
b4c6f4562e413ce643e58686703b20dc
smalltalk
Smalltalk
4
2016-09-13T16:22:51
True
False
False
/api/public/snipt/19569/
very-convenient-for-return-values
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="nc">Object</span><span class="nf">&gt;</span><span class="nv">isntNil</span> </span><span id="L-2"><a name="L-2"></a> <span class="nf">self</span> <span class="nf">assert:</span> <span class="bp">self</span> <span class="nf">notNil</span><span class="p">.</span> </span><span id="L-3"><a name="L-3"></a> <span class="o">^</span> <span class="bp">self</span> </span></pre></div> </td></tr></table>
pharo, smalltalk

Smalltalk

Stupid idea, freezes up the image.

doesNotUnderstand: aMessage
	self fail.
https://snipt.net/embed/8534b235af8f08f3104ae37916d37024/
https://snipt.net/raw/8534b235af8f08f3104ae37916d37024/
8534b235af8f08f3104ae37916d37024
smalltalk
Smalltalk
2
2016-09-13T05:16:55
True
False
False
/api/public/snipt/19341/
stupid-idea-freezes-up-the-image
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="nf">doesNotUnderstand:</span> <span class="nv">aMessage</span> </span><span id="L-2"><a name="L-2"></a> <span class="bp">self</span> <span class="nf">fail</span><span class="p">.</span> </span></pre></div> </td></tr></table>
pharo, smalltalk

Smalltalk

Gofer script to install Mocketry.

1
2
3
4
 Gofer new
     squeaksource: 'Mocketry';
     package: 'Mocketry' ;
     load
https://snipt.net/embed/03688078e2e406d40604a65933c62bce/
https://snipt.net/raw/03688078e2e406d40604a65933c62bce/
03688078e2e406d40604a65933c62bce
smalltalk
Smalltalk
4
2016-09-25T02:33:53
True
False
False
/api/public/snipt/17283/
gofer-script-to-install-mocketry
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a> <span class="nc">Gofer</span> <span class="nb">new</span> </span><span id="L-2"><a name="L-2"></a> <span class="nf">squeaksource:</span> <span class="s">&#39;Mocketry&#39;</span><span class="p">;</span> </span><span id="L-3"><a name="L-3"></a> <span class="nf">package:</span> <span class="s">&#39;Mocketry&#39;</span> <span class="p">;</span> </span><span id="L-4"><a name="L-4"></a> <span class="nf">load</span> </span></pre></div> </td></tr></table>
gofer, pharo, smalltalk, squeak
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.