lib/vnstat/interface_collection.rb in vnstat-ruby-1.0.5 vs lib/vnstat/interface_collection.rb in vnstat-ruby-1.1.0

- old
+ new

@@ -45,11 +45,11 @@ # @raise [UnknownInterface] An error that is raised if the # specified interface is not tracked. # @return [Interface] def [](id) interfaces_hash.fetch(id.to_s) do - fail UnknownInterface.new(id.to_s), - "Unknown interface: #{id}" + raise UnknownInterface.new(id.to_s), + "Unknown interface: #{id}" end end ## # Iterates over each interface.