From d3c41c9c0f2098b87cd269f5f52e414fc3639f38 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Wed, 7 Dec 2016 14:30:42 +0100 Subject: [PATCH] Sequel: avoid shadowing outer variable --- lib/awesome_print/ext/sequel.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/awesome_print/ext/sequel.rb b/lib/awesome_print/ext/sequel.rb index 9b50f1b..5ee5acf 100644 --- a/lib/awesome_print/ext/sequel.rb +++ b/lib/awesome_print/ext/sequel.rb @@ -45,8 +45,8 @@ module AwesomePrint # Format Sequel Model class. #------------------------------------------------------------------------------ def awesome_sequel_model_class(object) - data = object.db_schema.inject({}) { |h, (name, data)| h.merge(name => data[:db_type]) } - "class #{object} < #{object.superclass} " << awesome_hash(data) + result = object.db_schema.inject({}) { |h, (name, data)| h.merge(name => data[:db_type]) } + "class #{object} < #{object.superclass} " << awesome_hash(result) end end