From: "Berger, Daniel" Date: 2006-05-16T01:40:20+09:00 Subject: Re: Search an array > -----Original Message----- > From: list-bounce@example.com > [mailto:list-bounce@example.com] On Behalf Of Patrick Spence > Sent: Monday, May 15, 2006 10:35 AM > To: ruby-talk ML > Subject: Re: Search an array > > > Mike Fletcher wrote: > > irb(main):018:0> pp $0 > > "C:/mhiqTest/testAdoConnection.rb" > > => nil > > irb(main):019:0> pp $a > > ["c:/ruby/lib/ruby/site_ruby/1.8/DBD/ADO/ADO.rb:57:in `connect'", > > "c:/ruby/lib/ruby/site_ruby/1.8/dbi.rb:424:in `connect'", > > "c:/ruby/lib/ruby/site_ruby/1.8/dbi.rb:215:in `connect'", > > "C:/mhiqTest/testAdoConnection.rb:16"] > > => nil > > irb(main):020:0> $a.grep( %r/^#$0/ ) > > => ["C:/mhiqTest/testAdoConnection.rb:16"] > > What is "pp"? BTW, I'm very new to Ruby! It's short for "pretty print". It's meant to provide prettier inspection for objects (mostly used for STDOUT, I imagine). I use it for debugging sometimes. It's part of the stdlib, so you can find docs for it at ruby-doc.org. Regards, Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.