From 18bf21605ab7c8eeee253d05e508d402414ff0bb Mon Sep 17 00:00:00 2001 From: Kyrylo Silin Date: Sat, 11 May 2019 02:12:40 +0300 Subject: Resolve config warnings about redefined method I spotted "method redefined" warnings while working with Pry in another project, which used `--warnings`. It would be nice to enable `--warnings` in RSpec, however it's a bit tricky because our test suite has a lot of violations (on purpose). We should strive to fix all possible warnings, though (especially those that occur in `lib/`). --- lib/pry/config.rb | 4 +--- lib/pry/pry_class.rb | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/pry/config.rb b/lib/pry/config.rb index 18626363..c42bab21 100644 --- a/lib/pry/config.rb +++ b/lib/pry/config.rb @@ -108,9 +108,6 @@ class Pry # @return [Integer] how many input/output lines to keep in memory attribute :memory_size - # @return [Proc] - attribute :control_d_handler - # @return [Proc] The proc that runs system commands attribute :system @@ -263,6 +260,7 @@ class Pry @custom_attrs = @custom_attrs.dup end + attr_reader :control_d_handler def control_d_handler=(value) proxy_proc = if value.arity == 2 diff --git a/lib/pry/pry_class.rb b/lib/pry/pry_class.rb index 3e8792c8..6a7b6a8c 100644 --- a/lib/pry/pry_class.rb +++ b/lib/pry/pry_class.rb @@ -16,7 +16,6 @@ class Pry attr_accessor :quiet attr_accessor :last_internal_error attr_accessor :config - attr_writer :history def_delegators :@plugin_manager, :plugins, :load_plugins, :locate_plugins -- cgit v1.2.1