you are right, I tried this also :binding.eval("f = Class.new { def []; :hello; end }")

then also same error. Any guesses?