From: "Ståle Z.H" Date: 2008-08-02T05:19:06+09:00 Subject: Re: Help finding this syntax error I think you need a space between respond_to? and :select: if(FieldTypes.key? field && FieldTypes[field].respond_to? :select) Patrick Li skrev: > > if(FieldTypes.key? field && FieldTypes[field].respond_to?:select) > puts "selectable" > > > Hi, I'm having trouble writing the above line correctly. It works if I > explicitly put: > > FieldTypes[field].respond_to?(:select) > > But I don't understand why the parenthesis are required in this case. > > Thanks a lot for helping > -Cuppo > -- > Posted via http://www.ruby-forum.com/.