lib/judge_system.rb in judge_system-0.1.3 vs lib/judge_system.rb in judge_system-0.1.4

- old
+ new

@@ -35,10 +35,11 @@ end end module Wandbox def run lang, code, input, time - sys = File.open("./lib/compile_systems/#{lang}_system.cpp", "r").read + path = Gem::Specification.find_by_path('judge_system').full_gem_path + sys = File.open("#{path}/lib/compile_systems/#{lang}_system.cpp", "r").read data = nil stdin = code + "\n<$><*><$><*><$><*><$><*><$><*><$><*><$>\n" + input begin data = Web.compile({ compiler: "gcc-head", code: sys, stdin: stdin }) rescue