search_a_list_1.sf 187 B

123456789
  1. #!/usr/bin/ruby
  2. #
  3. ## https://rosettacode.org/wiki/Search_a_list
  4. #
  5. var haystack = %w(Zig Zag Wally Ronald Bush Krusty Charlie Bush Bozo);
  6. say haystack.last_index{|item| item == "Bush"};