From: "Peña, Botp" Date: 2006-11-11T18:50:59+09:00 Subject: Re: can i shorten up this function ? :fr nephish [mailto:nephish@gmail.com] # def get_in_list(status) # my_list = 'x,j,m,jrn,fnk,foo,other' # my_list_array = my_list.split(',') a candidate for chaining methods # if my_list_array.include?(status) # return true # else # return false # end you are repeating and paraphrasing my_list_array.include?(status). lose the returns, lose the ifs. this is ruby. r u a c programmer? ;-) nonetheless, this is again a candidate for chaining. # end # # i dunno, just thought there might be a prettier way to do this. if you get a solution within a minute, including the typing, then that's pretty :) kind regards -botp # any suggestions ? # thanks # # #