Demo entry 3608297

Ruby 2 syntax

   

Submitted by anonymous on Feb 13, 2016 at 12:16
Language: Ruby. Code size: 265 Bytes.

# Ruby 2.1

[42r, 42i, 42ri]

4e2i  # okay
4e2r  # syntax error


# Ruby 2.2

{key: 6}
{'key': 6}
{"key": 6}
{"key#{blob}": 6}


# Ruby 2.3

safe&.navigation

squiggly_heredoc = <<~9098
  Ruby syntax is a chaos.

  -- 
  Yusuke Endoh
9098

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).