Don't nest proxy contexts in execution environment

Fixes #10
This commit is contained in:
Andrew Meyer 2014-01-09 21:46:26 -06:00
parent 261aef4b3e
commit 02efcb2e7c
1 changed files with 1 additions and 1 deletions

View File

@ -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)