From: "Iñaki Baz Castillo" Date: 2009-07-22T08:05:18+09:00 Subject: Re: Default parameter values for methods in Ruby 1.9 El Miércoles, 22 de Julio de 2009, Joseph Lenton escribió: > Iñaki Baz Castillo wrote: > > Hi, I expected that the following is valid in Ruby 1.9: > > > > def get_element(auid, document=nil, selector, check_etag=true) > > [...] > > end > > > > However I get an error: > > > > syntax error, unexpected '=', expecting ')' (SyntaxError) ..., > > element_selector, check_etag=true) > > ^ > > > > Thanks for any tip. > > You couldn't you rearrange it to? > > def get_element(auid, selector, document=nil, check_etag=true) > [...] > end Yes, I could, but I prefer to keep the order. -- Iñaki Baz Castillo