literals.txt 810 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. nil
  2. true
  3. false
  4. 1
  5. 1_i8
  6. 1_i16
  7. 1_i32
  8. 1_i64
  9. 1_i128
  10. 1_u8
  11. 1_u16
  12. 1_u32
  13. 1_u64
  14. +10
  15. -20
  16. 2147483648
  17. 9223372036854775808
  18. 1_000_000
  19. 0b1101
  20. 0o123
  21. 0xFE012D
  22. 0xfe012d
  23. 1_f64
  24. 1.0
  25. 1.0_f32
  26. 1_f32
  27. 1e10
  28. 1e10_f64
  29. 1.5e10
  30. 1.5e-7
  31. +1.3
  32. -0.5
  33. 1_000_000.111_111
  34. 1_000_000.111_111e12
  35. 'c'
  36. '\\'
  37. '\u{ABCD}'
  38. "string"
  39. "\u{48 45 4C 4C 4F}"
  40. "interpolated #{string}"
  41. "interpolated #{"string"}"
  42. %(string)
  43. %q(string)
  44. %Q(string)
  45. %(hello ("world"))
  46. %[hello ["world"]]
  47. %{hello {"world"}}
  48. %<hello <"world">>
  49. %|hello "world"|
  50. "hello
  51. world"
  52. "hello \
  53. world, \
  54. no newlines"
  55. <<-STRING
  56. Hello world
  57. STRING
  58. <<-'HERE'
  59. hello \n
  60. HERE
  61. :unquoted_symbol
  62. :"quoted symbol"
  63. :question?
  64. :exclamation!
  65. :+
  66. %i(foo(bar) baz)
  67. %w(one two three)
  68. /foo|bar/
  69. /h(e+)llo/
  70. /\d+/
  71. /あ/
  72. %r((/))
  73. %r[[/]]
  74. %r{{/}}
  75. %r<</>>
  76. %r|/|
  77. `echo foo > foo.txt`