Skip to content

Instantly share code, notes, and snippets.

@austintaylor
Last active October 5, 2015 10:07
Show Gist options
  • Save austintaylor/2790526 to your computer and use it in GitHub Desktop.
Save austintaylor/2790526 to your computer and use it in GitHub Desktop.
Valid ruby syntax
1.9.3p0 :001 > % % % % %
=> "%"
1.9.3p0 :002 > % % % % % % % % % % %
=> "%"
1.9.3p0 :003 > !?!??!:?!
(irb):70: warning: string literal in condition
=> "!"
1.9.3p0 :004 > % . . * 0
=> ""
1.9.3p0 :005 > 0_0
=> 0
irb(main):011:0> class O; def O; end; end; o=O.new
=> #<O:0x007ffd2b1f2838>
irb(main):012:0> (o.O)
=> nil
irb(main):023:0> -_-_-_-_
=> -0.0
irb(main):025:0> Oo=1; oO=2
=> 2
irb(main):026:0> (Oo..oO)
=> 1..2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment