From: ngrandy Date: 2008-02-15T14:54:58+09:00 Subject: accessing binding in eval with $SAFE=4 hi all, can anyone explain why this doesn't work? class MyBinding def my_test "success!" end end b = MyBinding.new.instance_eval{binding} thread = Thread.start do $SAFE = 4 cmd = 'my_test' result = eval(cmd, b) end p thread.value i know i can't modify the binding object in $SAFE=4, but i thought i could access it at least. what is an alternate approach? i am trying to execute code in a safe(ish) way within a context of my choice. thanks, nick