From: Ezra Zygmuntowicz Date: 2006-01-02T16:42:03+09:00 Subject: Re: Using the p command to print files On Jan 1, 2006, at 11:27 PM, Une b�vue wrote: > Benjamin Stiglitz wrote: > >> ri Object::new > ~/Desktop/ruby-1.8.4%> ri Object::new > ------------------------------------------------------------ > Object::new > Object::new() > ---------------------------------------------------------------------- > -- > Not documented > ~/Desktop/ruby-1.8.4%> ri Kernel#p > zsh: no matches found: Kernel#p > > just for fun ))) > -- > une b�vue > (~/):~>$: ri "Kernel#p" --------------------------------------------------------------- Kernel#p p(obj, ...) => nil ------------------------------------------------------------------------ For each object, directly writes obj.inspect followed by the current output record separator to the program's standard output. p bypasses the Ruby I/O libraries. S = Struct.new(:name, :state) s = S['dave', 'TX'] p s produces: # you need to quote it because of the # char Cheers- Ezra