Skip to content

Commit 3643930

Browse files
committed
Merge pull request #40 from ruby-debug/code-cleanup
Code cleanup
2 parents 1d4b1dd + e216560 commit 3643930

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

lib/ruby-debug-ide/commands/condition.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ def execute
1212
errmsg "\"condition\" must be followed a breakpoint number and expression\n"
1313
else
1414
breakpoints = Debugger.breakpoints.sort_by{|b| b.id }
15-
largest = breakpoints.inject(0) do |largest, b|
16-
largest = b.id if b.id > largest
15+
largest = breakpoints.inject(0) do |largest_so_far, b|
16+
b.id if b.id > largest_so_far
1717
end
1818
if 0 == largest
1919
print "No breakpoints have been set.\n"

lib/ruby-debug-ide/commands/enable.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ module Debugger
33
module EnableDisableFunctions # :nodoc:
44
def enable_disable_breakpoints(is_enable, args)
55
breakpoints = Debugger.breakpoints.sort_by{|b| b.id }
6-
largest = breakpoints.inject(0) do |largest, b|
7-
largest = b.id if b.id > largest
6+
largest = breakpoints.inject(0) do |largest_so_far, b|
7+
b.id if b.id > largest_so_far
88
end
99
if 0 == largest
1010
errmsg "No breakpoints have been set.\n"

lib/ruby-debug-ide/commands/jump.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def help(cmd)
6767
6868
Change the next line of code to be executed.
6969
}
70-
end
70+
end
7171
end
7272
end
7373
end

lib/ruby-debug-ide/commands/pause.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def help(cmd)
2727
%{
2828
pause <nnn>\tpause a running thread
2929
}
30-
end
30+
end
3131
end
3232
end
3333
end

lib/ruby-debug-ide/commands/set_type.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def help(cmd)
4141
4242
Change the type of <var> to <type>
4343
}
44-
end
44+
end
4545
end
4646
end
4747
end

lib/ruby-debug-ide/ide_processor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def proceed
134134
end
135135

136136
def restore_context
137-
context = @original_context
137+
@context = @original_context
138138
end
139139
end
140140

lib/ruby-debug-ide/xml_printer.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def print_exception(exception, binding)
282282
InspectCommand.reference_result(proxy)
283283
print_variable('error', proxy, 'exception')
284284
end
285-
rescue Exception => e
285+
rescue Exception
286286
print "<processingException type=\"%s\" message=\"%s\"/>",
287287
exception.class, CGI.escapeHTML(exception.to_s)
288288
end
@@ -294,11 +294,11 @@ def print_inspect(eval_result)
294294
end
295295

296296
def print_load_result(file, exception=nil)
297-
if exception then
297+
if exception
298298
print("<loadResult file=\"%s\" exceptionType=\"%s\" exceptionMessage=\"%s\"/>", file, exception.class, CGI.escapeHTML(exception.to_s))
299299
else
300300
print("<loadResult file=\"%s\" status=\"OK\"/>", file)
301-
end
301+
end
302302
end
303303

304304
def print_element(name)

0 commit comments

Comments
 (0)