From: darren kirby Date: 2006-10-01T23:04:22+09:00 Subject: Re: Ruby's equivalent of PHP explode quoth the voipfc@googlemail.com: > Ryan Eibling wrote: > > Paul Lutus wrote: > > > data = File.read("filename.ini") > > > > > > my_hash = {} > > I am trying to understand what {} means in ruby. I understand that it > means an empty block, but what does it mean in this context? > > Does it mean nil? Does it simply my_hash as an associative array? It just creates an empty hash. It is equivalent to: my_hash = Hash.new And no, an empty hash is not nil: irb(main):001:0> {} == nil => false -d -- darren kirby :: Part of the problem since 1976 :: http://badcomputer.org "...the number of UNIX installations has grown to 10, with more expected..." - Dennis Ritchie and Ken Thompson, June 1972