From: Keith Bennett Date: 2011-08-10T09:17:15+09:00 Subject: Re: Inspect method inspect is especially useful in logging/debugging. Apparently, irb calls inspect when outputting the value of an expression. Check this out: ree-1.8.7-2011.03 :007 > a = [1,2] => [1, 2] ree-1.8.7-2011.03 :008 > a.to_s => "12" ree-1.8.7-2011.03 :009 > a.inspect => "[1, 2]" ree-1.8.7-2011.03 :010 > h = { :fruit => 'apple', :color => 'yellow' } => {:fruit=>"apple", :color=>"yellow"} ree-1.8.7-2011.03 :011 > h.to_s => "fruitapplecoloryellow" ree-1.8.7-2011.03 :012 > h.inspect => "{:fruit=>\"apple\", :color=>\"yellow\"}" - Keith