From: Mat Schaffer Date: 2006-12-29T13:49:46+09:00 Subject: Re: newbie: what is ruby's var_dump()? On Dec 28, 2006, at 11:05 PM, Phrogz wrote: > r wrote: >> thx >> -R > > Answer #1: > Perhaps you meant to ask: > "Hi, I'm used to language AAA, where there is a var_dump() > function/method that does BBB. How can I do the same thing in Ruby?" > > If so, please supply values for AAA and BBB (or at *least* AAA) and > I'd > be happy to help. > > > Answer #2: > http://www.google.com/search?q=ruby+var_dump > ...and since I see "PHP" in the title of the first search result, I > feel compelled to point out that this mailing list is for "Ruby" (the > programming language), not "Ruby on Rails" (the web development > framework that uses Ruby the language to get some stuff done). In case > var_dump() is a PHP function that is web related (and not something > part of the core language). I didn't see the original post, but I bet you're looking for one of the following: p pp Object#inspect Or if you really need to get everything contained in an object, I generally use #to_yaml. -Mat