Example: you have an array a = [1,2,3,4] and a string s = 'hello'. a.inspect returns the string [1,2,3,4], and s.inspect returns the string "hello" (including the quotation marks). So p a,s would output:
[1,2,3,4]
"hello"
That's what the ruby p function does.
No comments:
Post a Comment