Function Ruy Code

Explain the error in the following sample of Ruby code. Reference the line which the error is found on:

1- function effective_date(eff_date) 2- if eff_date.length < 3 3- eff_date = Time.now + (eff_date.to_i * 24 * 60 * 60) 4- return eff_date.strftime("%m%d%Y") 5- else 6- return eff_date 7- end 8- end