The Curious Case of the Missing Method Part 5

Submitted By:
david

Difficulty:
Elementary

Tags:
arrays

Instructions:
Before Ruby 1.9, hashes were not ordered so often times Ruby programmers used associative arrays to store ordered maps. Fill in the function below.

Code:
trilogy = [["Sympathy for Mr Vengeance", "Ryu", "Cha Yeong-mi"], ["Oldboy", "Oh Dae-su", "Kang Hye-jeong"], 
  ["Sympathy for Lady Vengeance", "Lee Geum-ja"]]
  
assert_equal trilogy.___("Sympathy for Lady Vengeance"), ["Sympathy for Lady Vengeance", "Lee Geum-ja"]
assert_equal trilogy.r___("Ryu"), ["Sympathy for Mr Vengeance", "Ryu", "Cha Yeong-mi"]
assert_equal trilogy.r___("Lee Geum-ja"), ["Sympathy for Lady Vengeance", "Lee Geum-ja"]

Your Solution

Ruby 1.9.3

Back to Problems