Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Commit

Permalink
fixing continue command
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanb committed Jun 18, 2011
1 parent 84e72bc commit 0e04d7e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions lib/enlighten/debugger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ def eval_code(code)
end

def continue
result = run_command("continue")
run_command("continue")
@socket.close
result
end

def list
Expand Down
4 changes: 2 additions & 2 deletions lib/enlighten/public/javascripts/enlighten.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
$(function() {
$("#prompt form").submit(function() {
$("#prompt form").submit(function(e) {
$.post(this.action, $(this).serialize(), function(result) {
$("#prompt_section").before("<pre>&gt;&gt; " + $("#prompt_field").val() + "\n" + "<span class='response'>=&gt; " + result + "</span></pre>");
$("#prompt_field").val("");
});
return false;
e.preventDefault();
});
})
2 changes: 1 addition & 1 deletion lib/enlighten/views/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</div>
</form>
</div>
<p><a href="/debugger/continue">Continue</a></p>
<p><a href="/debugger/continue" class="continue">Continue</a></p>
<% @debugger.backtrace.each do |current, frame_num, description| %>
<div class="backtrace">
<strong>#<%= frame_num %>
Expand Down
3 changes: 1 addition & 2 deletions spec/enlighten/debugger_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
it "should continue" do
@socket.should_receive(:puts).with("continue")
@socket.should_receive(:close)
@socket.buffer << "response\n"
@debugger.continue.should == "response"
@debugger.continue
end

it "should list source code and split into numbered lines" do
Expand Down

0 comments on commit 0e04d7e

Please sign in to comment.