here I am making my confusions are more specific:

>> print(1..2).class
1..2=> NilClass
>> print (1..2).class
Range=> nil

Why the below 2 produces different output? How does `IRB` read the 
above?

>> print[].class
NoMethodError: undefined method `[]' for nil:NilClass
        from (irb):5
        from C:/Ruby193/bin/irb:12:in `<main>'
>> print [].class
Array=> nil

How does `IRB` read the above?

>> print{}.class
=> NilClass
>> print {}.class
=> NilClass

Why here both lines giving the same outputs unlike the above 2 ?

-- 
Posted via http://www.ruby-forum.com/.