What does the “=>” in “rescue Exception => e” do?
问题 Given the example: def method_of_doom my_string = "I sense impending doom." my_string.ah_ha_i_called_a_nonexistent_method rescue NoMethodError => e: puts "PROBLEM: " + e.to_s rescue Exception: puts "Uhh...there's a problem with that there method." end On the line where it says: rescue NoMethodError => e: What is the '=>' doing? How is it different than this usage: module FighterValues BAMBOO_HEAD = { 'life' => 120, 'hit' => 9 } DEATH = { 'life' => 90, 'hit' => 13 } KOALA = { 'life' => 100,