1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

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
This commit is contained in:
John Mair 2012-04-16 11:35:55 +12:00
parent df5931c681
commit 6cb64464fc
2 changed files with 2 additions and 2 deletions

View file

@ -82,7 +82,7 @@ class Pry
# @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 file

@ -288,7 +288,7 @@ class Pry
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