Ref. WGR Chapter 7, Built-in essentials
42
(Fixnum)3.14159
(Float)true
false
"apple"
'banana'
:apple
/fo*/i
["apple", "banana"]
(1..10)
{:apple => 'red', :banana => 'yellow'}
{apple: 'red', banana: 'yellow'}
to_i
converts to integerto_f
converts to floatto_s
converts to stringto_a
converts to arrayto_sym
converts to symbolto_s
in your UIto_s
is insufficient and therefore uselessdisplay_name
inspect
inspect
produces a debug-ready representation of the object