Pry gives a bunch of warnings

Calling pryin my RSpec spec_helper.rband running my specs gives me a bunch of warnings. How can I get rid of them?

/Library/Ruby/Gems/2.0.0/gems/pry-0.10.0/lib/pry/commands/bang.rb:3: warning: ambiguous first argument; put parentheses or even spaces
/Library/Ruby/Gems/2.0.0/gems/pry-0.10.0/lib/pry/commands/cat/file_formatter.rb:54: warning: assigned but unused variable - ext
/Library/Ruby/Gems/2.0.0/gems/pry-0.10.0/lib/pry/commands/ls/formatter.rb:43: warning: method redefined; discarding old grep
/Library/Ruby/Gems/2.0.0/gems/pry-0.10.0/lib/pry/pry_class.rb:22: warning: `*' interpreted as argument prefix
/Library/Ruby/Gems/2.0.0/gems/pry-0.10.0/lib/pry/pry_instance.rb:42: warning: `*' interpreted as argument prefix
/Library/Ruby/Gems/2.0.0/gems/pry-0.10.0/lib/pry/pry_instance.rb:172: warning: method redefined; discarding old memory_size
/Library/Ruby/Gems/2.0.0/gems/pry-0.10.0/lib/pry/config/convenience.rb:22: warning: previous definition of memory_size was here
/Library/Ruby/Gems/2.0.0/gems/pry-0.10.0/lib/pry/pry_instance.rb:176: warning: method redefined; discarding old memory_size=
/Library/Ruby/Gems/2.0.0/gems/pry-0.10.0/lib/pry/config/convenience.rb:23: warning: previous definition of memory_size= was here
/Library/Ruby/Gems/2.0.0/gems/pry-0.10.0/lib/pry/pry_instance.rb:602: warning: method redefined; discarding old pager
/Library/Ruby/Gems/2.0.0/gems/pry-0.10.0/lib/pry/config/convenience.rb:22: warning: previous definition of pager was here
/Library/Ruby/Gems/2.0.0/gems/pry-0.10.0/lib/pry/pry_instance.rb:609: warning: method redefined; discarding old output
/Library/Ruby/Gems/2.0.0/gems/pry-0.10.0/lib/pry/config/convenience.rb:22: warning: previous definition of output was here
/Library/Ruby/Gems/2.0.0/gems/pry-0.10.0/lib/pry/pager.rb:41: warning: private attribute?
/Library/Ruby/Gems/2.0.0/gems/yard-0.8.7.4/lib/yard/docstring.rb:175: warning: assigned but unused variable - open_parens
/Library/Ruby/Gems/2.0.0/gems/yard-0.8.7.4/lib/yard/docstring.rb:176: warning: assigned but unused variable - close_parens
/Library/Ruby/Gems/2.0.0/gems/yard-0.8.7.4/lib/yard/docstring_parser.rb:118: warning: character class has duplicated range: /\A[\r\n\s]+|[\r\n\s]+\Z/
/Library/Ruby/Gems/2.0.0/gems/yard-0.8.7.4/lib/yard/docstring_parser.rb:138: warning: assigned but unused variable - tag_klass
/Library/Ruby/Gems/2.0.0/gems/yard-0.8.7.4/lib/yard/tags/library.rb:236: warning: assigned but unused variable - arity
/Library/Ruby/Gems/2.0.0/gems/yard-0.8.7.4/lib/yard/docstring_parser.rb:118: warning: character class has duplicated range: /\A[\r\n\s]+|[\r\n\s]+\Z/
/Library/Ruby/Gems/2.0.0/gems/yard-0.8.7.4/lib/yard/logging.rb:179: warning: instance variable @progress_msg not initialized
/Library/Ruby/Gems/2.0.0/gems/yard-0.8.7.4/lib/yard/logging.rb:179: warning: instance variable @progress_msg not initialized
/Library/Ruby/Gems/2.0.0/gems/pry-0.10.0/lib/pry/commands/whereami.rb:140: warning: instance variable @method_code not initialized
/Library/Ruby/Gems/2.0.0/gems/pry-0.10.0/lib/pry/code.rb:267: warning: instance variable @with_indentation not initialized
/Library/Ruby/Gems/2.0.0/gems/pry-0.10.0/lib/pry/code.rb:267: warning: instance variable @with_indentation not initialized
/Library/Ruby/Gems/2.0.0/gems/pry-0.10.0/lib/pry/code.rb:267: warning: instance variable @with_indentation not initialized
/Library/Ruby/Gems/2.0.0/gems/pry-0.10.0/lib/pry/code.rb:267: warning: instance variable @with_indentation not initialized
/Library/Ruby/Gems/2.0.0/gems/pry-0.10.0/lib/pry/code.rb:267: warning: instance variable @with_indentation not initialized
/Library/Ruby/Gems/2.0.0/gems/pry-0.10.0/lib/pry/pager.rb:136: warning: instance variable @system_pager not initialized
/Library/Ruby/Gems/2.0.0/gems/pry-0.10.0/lib/pry/pager.rb:185: warning: instance variable @pager not initialized
/Library/Ruby/Gems/2.0.0/gems/pry-0.10.0/lib/pry/pager.rb:185: warning: instance variable @pager not initialized
+4
source share
2 answers

Remove the parameter --warningfrom the file .rspec.

+3
source

If there is no file in your project .rspecor .rspecthere is no option in the file --warning, you need to open spec/spec_helper.rband install config.warnings = false.

.rspec RSpec spec_helper.rb. .rspec , RSpec - (, , , .., ).

0

Source: https://habr.com/ru/post/1543946/


All Articles