From: Dave Thomas Date: 2001-05-07T22:09:25+09:00 Subject: [ruby-talk:14765] Re: skipping arguments touch freedom writes: > now, when calling this method, say i only want to change the value of > b, while leaving a the same. how can i do this? Some future Ruby will support keyword arguments, which means you could say something like the following (except the syntax is totally arbitrary: the final syntax will probably look a lot different): def addPerson(name, withAge: a=0, withSex: s=FEMALE, withHair: h=UNKNOWN) # ... end Then these would be valid calls: addPerson('Fred', 23, MALE, BROWN) addPerson 'Barney' withSex: MALE withAge: 20 addPerson 'Wilma' withHair: BLONDE (again, remember the syntax is just made up). In the meantime, you can almost have your second wish, as Ruby does support passing in has values as arguments: def addPerson(name, attributes) # .. end addPerson 'Fred', 'age' => 23, 'sex' => MALE, 'hair' => BROWN The last three parameters in this example will be added into a single hash, which will be received by addPerson in the 'attributes' parameter. Regards Dave