From bc1a75d53a0fa89430e9939d5461244d978368b7 Mon Sep 17 00:00:00 2001 From: danijoo Date: Sun, 5 Jan 2014 15:31:01 +0100 Subject: [PATCH] fixed exception for games without fellows --- lib/sightstone/match_history.rb | 2 ++ sightstone.gemspec | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/sightstone/match_history.rb b/lib/sightstone/match_history.rb index 6a51434..0e20098 100644 --- a/lib/sightstone/match_history.rb +++ b/lib/sightstone/match_history.rb @@ -37,9 +37,11 @@ class HistoryGame @createDate=data['createDate'] @createDateString=data['createDateString'] @fellowPlayers=[] + if(data.has_key? "fellowPlayers") data['fellowPlayers'].each do |player| @fellowPlayers << Player.new(player) end + end @gameId=data['gameId'] @gameMode=data['gameMode'] @gameType=data['gameType'] diff --git a/sightstone.gemspec b/sightstone.gemspec index 8aa6838..9f63545 100644 --- a/sightstone.gemspec +++ b/sightstone.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |s| s.name = 'sightstone' - s.version = '1.1.0' - s.date = '2014-01-01' + s.version = '1.1.1' + s.date = '2014-01-05' s.summary = 'Ruby wrapper for riots league of legends api' s.description = s.summary s.authors = ["Daniel Bauer"]