[ create a new paste ] login | about

Link: http://codepad.org/aEJRSdT4    [ raw code | output | fork ]

Ruby, pasted on Nov 15:
1
2
3
4
5
6
7
8
array = ['foo']
hash = {'foo' => 'bar'}

p array[0]
p array[42]

p hash['foo']
p hash['ruby']


Output:
1
2
3
4
"foo"
nil
"bar"
nil


Create a new paste based on this one


Comments: