From: Adam Prescott Date: 2011-07-25T00:57:56+09:00 Subject: Re: Exclusive operator in ruby --00151773e268faf80404a8d2c2ea Content-Type: text/plain; charset=UTF-8 On Sun, Jul 24, 2011 at 11:12 AM, amir e. wrote: > 2 - As respect , Ruby is very comfort language , can we define function > like this : > def myFunc( a=0 , b=1 , c=2 ) > d = a+b+c > end > > and call this function with only third argument like : > myFunc( , , 10). > You can if you're using 1.9. This isn't keyword arguments. >> def x(a = 1, b = 2, c) >> [a, b, c] >> end => nil >> x(2) => [1, 2, 2] >> x(3) => [1, 2, 3] >> x(5, 6) => [5, 2, 6] >> x(15, 20, 25) => [15, 20, 25] --00151773e268faf80404a8d2c2ea--