prompt.expect.txt 1.8 KB

1234567891011121314151617181920212223
  1. <span class="hljs-meta">2.0.0p0 :001 &gt;</span> [<span class="hljs-string">'some'</span>]
  2. =&gt; [<span class="hljs-string">"some"</span>]
  3. <span class="hljs-meta">2.0.0p0 :002 &gt;</span> if true
  4. <span class="hljs-meta">2.0.0p0 :003?&gt;</span> <span class="hljs-string">"yop"</span>
  5. <span class="hljs-meta">2.0.0p0 :004?&gt;</span> end
  6. =&gt; <span class="hljs-string">"yop"</span>
  7. <span class="hljs-meta">jruby-1.7.16 :001 &gt;</span> <span class="hljs-string">"RVM-Format"</span>
  8. <span class="hljs-meta">&gt;&gt;</span> obj = OpenStruct.new <span class="hljs-symbol">:integer</span> =&gt; <span class="hljs-number">987</span>, <span class="hljs-symbol">:symbol</span> =&gt; <span class="hljs-symbol">:so_great</span>
  9. =&gt; #&lt;OpenStruct integer=987, symbol=:so_great&gt;
  10. <span class="hljs-meta">&gt;&gt;</span> [obj,obj,obj]
  11. =&gt; [#&lt;OpenStruct integer=987, symbol=:so_great&gt;, #&lt;OpenStruct integer=987, symbol=:so_great&gt;, #&lt;OpenStruct integer=987, symbol=:so_great&gt;]
  12. <span class="hljs-meta">&gt;&gt;</span> {<span class="hljs-number">1</span> =&gt; obj, <span class="hljs-number">2</span> =&gt; obj}
  13. =&gt; {<span class="hljs-number">1</span>=&gt;#&lt;OpenStruct integer=987, symbol=:so_great&gt;, <span class="hljs-number">2</span>=&gt;#&lt;OpenStruct integer=987, symbol=:so_great&gt;}
  14. <span class="hljs-meta">&gt;&gt;</span> if <span class="hljs-number">10</span> &gt; <span class="hljs-number">20</span>
  15. <span class="hljs-meta">&gt;&gt;</span> <span class="hljs-string">"YEAH"</span>
  16. <span class="hljs-meta">&gt;&gt;</span> else
  17. <span class="hljs-meta">?&gt;</span> <span class="hljs-string">"NO"</span>
  18. <span class="hljs-meta">&gt;&gt;</span> end
  19. =&gt; <span class="hljs-string">"NO"</span>
  20. <span class="hljs-meta">irb(main):002:0&gt;</span> test = <span class="hljs-number">1</span>