From: Brian Candler Date: 2010-10-04T18:20:36+09:00 Subject: Re: How to suppress display of specific code in irb?? Don Norcott wrote: > require 'hpricot' > url = "http://www....." > doc = Hpricot.XML(open(url)) > > In interactive ruby can I suppress the output produced by > Hpricot.XML(open(url)) > > is this the stdout stream or is it something else? In Ruby, every expression has a value, and by default irb displays that value (more precisely, it shows value.inspect) For example: >> 1+2 => 3 >> puts 1+2 3 => nil >> In the second example, "3" is puts producing output, and the return value from puts is nil. -- Posted via http://www.ruby-forum.com/.