From 0b72994b63dbbbddaf0e77629249d92890a6e4a4 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Mon, 21 Nov 2016 08:25:47 -0800 Subject: Simplify Bitbucket::Page implementation --- lib/bitbucket/page.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/bitbucket') diff --git a/lib/bitbucket/page.rb b/lib/bitbucket/page.rb index bc51ce7dce2..b91a173b53c 100644 --- a/lib/bitbucket/page.rb +++ b/lib/bitbucket/page.rb @@ -23,7 +23,7 @@ module Bitbucket end def parse_values(raw, representation_class) - return [] if raw['values'].nil? || !raw['values'].is_a?(Array) + return [] unless raw['values'] && raw['values'].is_a?(Array) raw['values'].map { |hash| representation_class.new(hash) } end -- cgit v1.2.1