From: Michael Neumann Date: 2001-08-26T00:04:46+09:00 Subject: [ruby-talk:20375] Re: attribute setting method white space, bug? Zarkon wrote: > Hi, > I am using ruby 1.6.4 (2001-06-04) [i386-cygwin] , it's for windows > and it's alpha. > Reading and using the tutorial from programming ruby, I came across > the following example > > def durationInMinutes=(value) > ...... > > I put in some extra white space like this > > def durationInMinutes = (value) > ...... > > I got the following result > > D:\ruby\ont\Song.rb:14: parse error > def durationInMinutes =(value) > > Now it looks like a bug to me, but I'm to much of a newbie > comments? The method name is "durationInMinutes=", this is found in anObject.methods, or you can use this in obj.send. I wouldn't call it a bug. The parser expects the method name as one piece. Note you can also write: def durationInMinutes= value .... end Assigning a value to it is different; you can add extra whitespaces: obj.durationInMinutes = "hallo" Regards, Michael -- Michael Neumann merlin.zwo InfoDesign GmbH http://www.merlin-zwo.de