From: Todd Benson Date: 2009-04-09T23:28:48+09:00 Subject: Re: Hash questions On Thu, Apr 9, 2009 at 9:18 AM, Hunt Jon wrote: > When I run: > > p {"foo" => 1, "bar" => 2, "baz" => 3 } > > I get an error. > > But when I run: > > x = {"foo" => 1, "bar" => 2, "baz" => 3 } > p x > > There's no error. > > What's the difference between the two? > > John p( {"foo" => 1, "bar" => 2, "baz" => 3} ) You need parentheses in the first case, I believe, so the that the parser knows you are not trying to send a block to the method #p. Todd