Skip to content

Commit

Permalink
fix wrong scope in timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
siuying committed Apr 22, 2012
1 parent ba3c224 commit 1f6289e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/instant/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ def run(source, timeout=1)
begin
@processed = @processor.process(source)
context = Context.new

begin
return_value = nil

begin
Timeout::timeout(timeout) do
return_value = context.instance_eval(@processed)
end
Expand Down

0 comments on commit 1f6289e

Please sign in to comment.