From: Amir Ebrahimifard Date: 2010-07-22T20:39:57+09:00 Subject: Inspect Hi What is the use of "inspect"? for example in this code: array = [1,2,3,4,5] # => [1, 2, 3, 4, 5] array2 = [1, "2", 3.0, ["a", "b"], "dog"] # => [1, "2", 3.0, ["a", "b"], "dog"] array.inspect # => "[1, 2, 3, 4, 5]" array # => [1, 2, 3, 4, 5] puts array # 1 # 2 # 3 # 4 # 5 # => nil puts array.inspect # [1, 2, 3, 4, 5] # => nil puts array2.inspect # [1, "2", 3.0, ["a", "b"], "dog"] # => nil -- Posted via http://www.ruby-forum.com/.