http://rua.rubyforge.org/
なんかRubyForgeでミラーリングされていないようなので↓においときます。
http://storehouse.sakura.ne.jp/rua/
変更点
require 'rua' require 'pp' rua = Rua.new(:all) rua.error_handler = lambda do |e, ar| pp ar.to_hash #=> {:linedefined=>-1, # :lastlinedefined=>-1, # :namewhat=>"global", # :short_src=>"[C]", # :name=>"errfunc", # :what=>"C", # :currentline=>-1, # :nups=>2, # :source=>"=[C]"} end rua.errfunc = lambda do raise 'xxxxx' end rua.eval(<<-EOS) errfunc() f = function() print('f() called.') end EOS pp rua.f.info.to_hash #=> {:linedefined=>3, # :lastlinedefined=>5, # :namewhat=>"", # :short_src=>"[string \" errfunc()...\"]", # :name=>nil, # :what=>"Lua", # :currentline=>-1, # :nups=>0, # :source=>" errfunc()\n\n f = function()\n print('f() called.')\n end\n"}