From: "Iñaki Baz Castillo" Date: 2009-07-22T07:25:02+09:00 Subject: Re: Default parameter values for methods in Ruby 1.9 El Martes, 21 de Julio de 2009, Joel VanderWerf 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 > > What do you expect > > get_element(1,2,3) > > to do? auid = 1 document = 2 selector = 3 check_etag = true Humm, I understand now... Having it, the second parameter "document=nil" is useless at all since it requires being declared anyway. Ok, I've solved my problem by leaving the method as follows: def get_element(auid, document, selector, check_etag=true) Thanks a lot. -- Iñaki Baz Castillo