Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Exception
- def fix_stack_save
- @stack_backup = backtrace[0] unless @stack_backup
- end
- alias :orig_backtrace :backtrace
- def backtrace
- stack = orig_backtrace
- stack[0] = @stack_backup if @stack_backup
- return stack
- end
- end
- module EvalFixer
- def eval(script)
- instance_eval %Q{
- begin
- #{script}
- rescue => ex
- ex.fix_stack_save
- raise ex
- end
- }
- end
- end
- class Game_Interpreter
- include EvalFixer
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement