1234567891011121314151617181920212223 |
- <span class="hljs-meta">2.0.0p0 :001 ></span> [<span class="hljs-string">'some'</span>]
- => [<span class="hljs-string">"some"</span>]
- <span class="hljs-meta">2.0.0p0 :002 ></span> if true
- <span class="hljs-meta">2.0.0p0 :003?></span> <span class="hljs-string">"yop"</span>
- <span class="hljs-meta">2.0.0p0 :004?></span> end
- => <span class="hljs-string">"yop"</span>
- <span class="hljs-meta">jruby-1.7.16 :001 ></span> <span class="hljs-string">"RVM-Format"</span>
- <span class="hljs-meta">>></span> obj = OpenStruct.new <span class="hljs-symbol">:integer</span> => <span class="hljs-number">987</span>, <span class="hljs-symbol">:symbol</span> => <span class="hljs-symbol">:so_great</span>
- => #<OpenStruct integer=987, symbol=:so_great>
- <span class="hljs-meta">>></span> [obj,obj,obj]
- => [#<OpenStruct integer=987, symbol=:so_great>, #<OpenStruct integer=987, symbol=:so_great>, #<OpenStruct integer=987, symbol=:so_great>]
- <span class="hljs-meta">>></span> {<span class="hljs-number">1</span> => obj, <span class="hljs-number">2</span> => obj}
- => {<span class="hljs-number">1</span>=>#<OpenStruct integer=987, symbol=:so_great>, <span class="hljs-number">2</span>=>#<OpenStruct integer=987, symbol=:so_great>}
- <span class="hljs-meta">>></span> if <span class="hljs-number">10</span> > <span class="hljs-number">20</span>
- <span class="hljs-meta">>></span> <span class="hljs-string">"YEAH"</span>
- <span class="hljs-meta">>></span> else
- <span class="hljs-meta">?></span> <span class="hljs-string">"NO"</span>
- <span class="hljs-meta">>></span> end
- => <span class="hljs-string">"NO"</span>
- <span class="hljs-meta">irb(main):002:0></span> test = <span class="hljs-number">1</span>
|