Skip to content

Commit

Permalink
Fixed broken spec
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyObtiva committed Jul 24, 2020
1 parent 571e48b commit 5044bf8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/puts_debuggerer.rb
Expand Up @@ -74,7 +74,7 @@ def app_path=(path)
attr_reader :source_line_count

def source_line_count=(value)
@source_line_count = value.to_i || SOURCE_LINE_COUNT_DEFAULT
@source_line_count = value || SOURCE_LINE_COUNT_DEFAULT
end

# Header to include at the top of every print out.
Expand Down Expand Up @@ -578,14 +578,14 @@ def __caller_source_line__(caller_depth=0, source_line_count=nil, source_file=ni
f = File.new(source_file)
if f.respond_to?(:readline) # Opal Ruby Compatibility
source_lines = []
while f.lineno < source_line_number - 1 + source_line_count
file_line_number = f.lineno
while f.lineno < source_line_number + source_line_count
file_line_number = f.lineno + 1
file_line = f.readline
if file_line_number >= source_line_number - 1 && file_line_number < source_line_number - 1 + source_line_count
if file_line_number >= source_line_number && file_line_number < source_line_number + source_line_count
source_lines << file_line
end
end
source_line = source_lines.join(' '*5)
source_line = source_lines.join # (' '*5)
end
end
source_line
Expand Down

0 comments on commit 5044bf8

Please sign in to comment.