[ create a new paste ] login | about

Link: http://codepad.org/vSeR9Jox    [ raw code | fork ]

Ruby, pasted on Apr 23:
def lol0
  1 + x
end

LOL_MAX_STACK = 45

for i in 1 .. LOL_MAX_STACK
  instance_eval("def lol#{i};  lol#{i-1}  ;end", __FILE__, __LINE__)
end

begin
  rgss_main do
    begin
      eval("lol#{LOL_MAX_STACK}()")#SceneManager.run
    rescue RGSSReset
      Graphics.transition(10)
      retry
    end
  end
rescue SystemExit
  exit
rescue Exception => error
  scripts_name = load_data('Data/Scripts.rvdata2')
  scripts_name.collect! {|script|  script[1]  }
  backtrace = ''
  error.backtrace.each_with_index {|line,i|
    if line =~ /{(.*)}(.*)/
      backtrace << scripts_name[$1.to_i] << $2 << "\n"
    elsif line.start_with?(':1:')
      break
    else
      backtrace << line << "\n"
    end
  }
  raise error.class, error.message + "\n" + backtrace, [error.backtrace.first]
  exit
end


Create a new paste based on this one


Comments: