From 02efcb2e7cbbe89c9d54fe6881f179ba3e06c35c Mon Sep 17 00:00:00 2001 From: Andrew Meyer Date: Thu, 9 Jan 2014 21:46:26 -0600 Subject: [PATCH] Don't nest proxy contexts in execution environment Fixes #10 --- lib/docile/execution.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docile/execution.rb b/lib/docile/execution.rb index 2dec6e2..f5696b9 100644 --- a/lib/docile/execution.rb +++ b/lib/docile/execution.rb @@ -16,7 +16,7 @@ module Docile # @return [Object] the return value of the block def exec_in_proxy_context(dsl, proxy_type, *args, &block) block_context = eval('self', block.binding) - proxy_context = proxy_type.new(dsl, proxy_type.new(dsl, block_context)) + proxy_context = proxy_type.new(dsl, block_context) begin block_context.instance_variables.each do |ivar| value_from_block = block_context.instance_variable_get(ivar)