Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed a couple of silly little bugs

* an oversight (using str instead of str_or_lines in code.rb)
* not checking for nil in Pry::Method#source_location in method.rb
  • Loading branch information...
commit 6cb64464fcc8c6af3bf83a3c1570d72628e07aee 1 parent df5931c
@banister banister authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  lib/pry/code.rb
  2. +1 −1  lib/pry/method.rb
View
2  lib/pry/code.rb
@@ -82,7 +82,7 @@ def incomplete_user_input_exception?(ex)
# @return [String, nil] The first complete expression, or `nil` if
# none found.
def retrieve_complete_expression_from(str_or_lines)
- lines = str_or_lines.is_a?(Array) ? str_or_lines : str.each_line.to_a
+ lines = str_or_lines.is_a?(Array) ? str_or_lines : str_or_lines.each_line.to_a
code = ""
lines.each do |v|
View
2  lib/pry/method.rb
@@ -288,7 +288,7 @@ def source_type
end
def source_location
- if Helpers::BaseHelpers.rbx?
+ if @method.source_location && Helpers::BaseHelpers.rbx?
file, line = @method.source_location
[RbxPath.convert_path_to_full(file), line]
else
Please sign in to comment.
Something went wrong with that request. Please try again.