def context_binding
  @context.instance_eval {binding}
end

def eval(str)
  ->{$SAFE = 4; context_binding.eval(str)}.()
end

the binding context is unsafe since it's constructed in the sandbox

but since it appears to not close over anything other than self
(@context) which is safe, is it then effectively safe?

-- 
Posted via http://www.ruby-forum.com/.