summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mair <jrmair@gmail.com>2016-07-11 04:19:41 +0200
committerGitHub <noreply@github.com>2016-07-11 04:19:41 +0200
commit328a73622832f40474a1c1a9646a8d2704de4fb7 (patch)
tree5b731c0b49d1c212e7af849a1d06efad8681fb30
parentb41ff2437f270d11d3054d4688ea66b8fcd596a2 (diff)
parentd1db5249b63e90b4d768ced2d03c2b5c503f9f3b (diff)
downloadpry-328a73622832f40474a1c1a9646a8d2704de4fb7.tar.gz
Merge pull request #1559 from ravinggenius/0.10-stable
Cleanup warnings
-rw-r--r--lib/pry/code.rb2
-rw-r--r--lib/pry/commands/show_info.rb6
-rw-r--r--lib/pry/commands/whereami.rb6
-rw-r--r--lib/pry/history.rb2
-rw-r--r--lib/pry/module_candidate.rb1
-rw-r--r--lib/pry/pager.rb3
-rw-r--r--lib/pry/wrapped_module.rb1
7 files changed, 20 insertions, 1 deletions
diff --git a/lib/pry/code.rb b/lib/pry/code.rb
index f58189eb..da928b58 100644
--- a/lib/pry/code.rb
+++ b/lib/pry/code.rb
@@ -91,6 +91,8 @@ class Pry
@lines = lines.each_with_index.map { |line, lineno|
LOC.new(line, lineno + start_line.to_i) }
@code_type = code_type
+
+ @with_marker = @with_indentation = nil
end
# Append the given line. +lineno+ is one more than the last existing
diff --git a/lib/pry/commands/show_info.rb b/lib/pry/commands/show_info.rb
index 92958cb4..88a62644 100644
--- a/lib/pry/commands/show_info.rb
+++ b/lib/pry/commands/show_info.rb
@@ -4,6 +4,12 @@ class Pry
command_options :shellwords => false, :interpolate => false
+ def initialize(*)
+ super
+
+ @used_super = nil
+ end
+
def options(opt)
opt.on :s, :super, "Select the 'super' method. Can be repeated to traverse the ancestors", :as => :count
opt.on :l, "line-numbers", "Show line numbers"
diff --git a/lib/pry/commands/whereami.rb b/lib/pry/commands/whereami.rb
index ac701645..2ceff72f 100644
--- a/lib/pry/commands/whereami.rb
+++ b/lib/pry/commands/whereami.rb
@@ -1,6 +1,12 @@
class Pry
class Command::Whereami < Pry::ClassCommand
+ def initialize(*)
+ super
+
+ @method_code = nil
+ end
+
class << self
attr_accessor :method_size_cutoff
end
diff --git a/lib/pry/history.rb b/lib/pry/history.rb
index 81b74176..494a6b70 100644
--- a/lib/pry/history.rb
+++ b/lib/pry/history.rb
@@ -83,7 +83,7 @@ class Pry
def read_from_file
path = history_file_path
- if File.exists?(path)
+ if File.exist?(path)
File.foreach(path) { |line| yield(line) }
end
rescue => error
diff --git a/lib/pry/module_candidate.rb b/lib/pry/module_candidate.rb
index 4c97f134..831e34ea 100644
--- a/lib/pry/module_candidate.rb
+++ b/lib/pry/module_candidate.rb
@@ -49,6 +49,7 @@ class Pry
raise CommandError, "No such module candidate. Allowed candidates range is from 0 to #{number_of_candidates - 1}"
end
+ @source = @source_location = nil
@rank = rank
@file, @line = source_location
end
diff --git a/lib/pry/pager.rb b/lib/pry/pager.rb
index e5451d2e..53942987 100644
--- a/lib/pry/pager.rb
+++ b/lib/pry/pager.rb
@@ -133,6 +133,8 @@ class Pry::Pager
pager
end
+ @system_pager = nil
+
def self.available?
if @system_pager.nil?
@system_pager = begin
@@ -151,6 +153,7 @@ class Pry::Pager
super
@tracker = PageTracker.new(height, width)
@buffer = ""
+ @pager = nil
end
def write(str)
diff --git a/lib/pry/wrapped_module.rb b/lib/pry/wrapped_module.rb
index bfa5793f..f64e17d3 100644
--- a/lib/pry/wrapped_module.rb
+++ b/lib/pry/wrapped_module.rb
@@ -63,6 +63,7 @@ class Pry
@source = nil
@source_location = nil
@doc = nil
+ @all_source_locations_by_popularity = nil
end
# Returns an array of the names of the constants accessible in the wrapped