On Tuesday 11 July 2006 16:16, Minkoo Seo wrote: > Hi. > > ri Kernel#p shows this: > > --------------------------------------------------------------- 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. > > S = Struct.new(:name, :state) > s = S['dave', 'TX'] > p s > > _produces:_ > > #<S name="dave", state="TX"> > > But when I run the following: > > $cat tmp.rb > print $\ > $ ruby tmp.rb > nil$ > > Namely, Kernel#p is expected to print 'current output record separator', > but current output separator is just *nil*. > > What I've done in the wrong way here? Is the ri document written wrongly? manveru@pi ~> irb p $\ nil # nil p $/ "\n" # nil guess you just have a typo there :) remember, the $/ is a jedi that just waits to attack and to slice output... it's not the output being attacked :) stupid way to remember... but maybe it helps - imho one shoulnd't have to remember that stuff anyway > > Sincerely, > Minkoo Seo