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

got rid of warnings caused by stricter ruby 1.9.3 rules

This commit is contained in:
John Mair 2011-08-16 17:00:18 +12:00
parent fb47d61215
commit 6f8bc2a412
5 changed files with 4 additions and 5 deletions

View file

@ -8,7 +8,6 @@ class Pry
DEFAULT_HOOKS = {
:before_session => proc do |out, target|
# ensure we're actually in a method
meth_name = target.eval('__method__')
file = target.eval('__FILE__')
# /unknown/ for rbx

View file

@ -75,7 +75,7 @@ e.g amend-line puts 'hello again' # no line number modifies immediately preced
output.puts "Invalid method name: #{meth_name}."
next
end
code, code_type = code_and_code_type_for(meth)
code, _ = code_and_code_type_for(meth)
next if !code
range = opts.l? ? one_index_range_or_number(opts[:l]) : (0..-1)

View file

@ -80,7 +80,7 @@ class Pry
next
end
contents, normalized_start_line, _ = read_between_the_lines(file_name, start_line, end_line)
contents, _, _ = read_between_the_lines(file_name, start_line, end_line)
contents = syntax_highlight_by_file_type_or_specified(contents, file_name, opts[:type])
if opts.l?

View file

@ -73,7 +73,7 @@ class Pry
end
def highlight(string, regexp, highlight_color=:bright_yellow)
highlighted = string.gsub(regexp) { |match| "<#{highlight_color}>#{match}</#{highlight_color}>" }
string.gsub(regexp) { |match| "<#{highlight_color}>#{match}</#{highlight_color}>" }
end
# formatting

View file

@ -290,7 +290,7 @@ class Pry
def process_yardoc_tag(comment, tag)
in_tag_block = nil
output = comment.lines.map do |v|
comment.lines.map do |v|
if in_tag_block && v !~ /^\S/
Pry::Helpers::Text.strip_color Pry::Helpers::Text.strip_color(v)
elsif in_tag_block