Okay, this should be a start! >---------------- cut here ----------------< def local(context,*declared) declared=declared.map{|e| e.id2name} found=eval("local_variables",context) found.each do |name| if !declared.include?(name) raise "hell" end end end def test local binding,:foo,:bar foo=0 bar=0 # baz=0 # uncomment to raise hell! end >---------------- and here ----------------< Beautify and extend this for a few days, and you may have something you can live with. Regards, 0ffh -- Posted via http://www.ruby-forum.com/.