diff --git a/.rubocop.yml b/.rubocop.yml index 8c2d4e5b..7e302463 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -71,3 +71,9 @@ Gemspec/RequiredRubyVersion: Style/ModuleFunction: Enabled: false + +Style/FrozenStringLiteralComment: + Enabled: true + EnforcedStyle: always + Exclude: + - 'spec/fixtures/example_nesting.rb' diff --git a/Gemfile b/Gemfile index 63493654..a6981aa5 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + source 'https://rubygems.org' gemspec diff --git a/Rakefile b/Rakefile index 81d3b01f..3a36ec20 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rake/clean' require 'rubygems/package_task' diff --git a/bin/pry b/bin/pry index e6914ce4..59b1edbc 100755 --- a/bin/pry +++ b/bin/pry @@ -1,4 +1,6 @@ #!/usr/bin/env ruby +# frozen_string_literal: true + $0 = 'pry' require 'pry' diff --git a/lib/pry.rb b/lib/pry.rb index 276a41e9..c33bc0cb 100644 --- a/lib/pry.rb +++ b/lib/pry.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'pry/version' require 'pry/last_exception' require 'pry/forwardable' diff --git a/lib/pry/basic_object.rb b/lib/pry/basic_object.rb index 72e6d99e..73e58eba 100644 --- a/lib/pry/basic_object.rb +++ b/lib/pry/basic_object.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class BasicObject < BasicObject [:Kernel, :File, :Dir, :LoadError, :ENV, :Pry].each do |constant| diff --git a/lib/pry/block_command.rb b/lib/pry/block_command.rb index 947f8e7d..bf74955f 100644 --- a/lib/pry/block_command.rb +++ b/lib/pry/block_command.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry # A super-class for Commands that are created with a single block. # diff --git a/lib/pry/class_command.rb b/lib/pry/class_command.rb index dde4781a..d8a4c6fc 100644 --- a/lib/pry/class_command.rb +++ b/lib/pry/class_command.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry # A super-class of Commands with structure. # diff --git a/lib/pry/cli.rb b/lib/pry/cli.rb index 1d7d7672..504cc6c4 100644 --- a/lib/pry/cli.rb +++ b/lib/pry/cli.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'stringio' class Pry diff --git a/lib/pry/code.rb b/lib/pry/code.rb index dd3858d7..dcd33d4a 100644 --- a/lib/pry/code.rb +++ b/lib/pry/code.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'method_source' class Pry diff --git a/lib/pry/code/code_file.rb b/lib/pry/code/code_file.rb index d120af84..c079ce7d 100644 --- a/lib/pry/code/code_file.rb +++ b/lib/pry/code/code_file.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'method_source' class Pry diff --git a/lib/pry/code/code_range.rb b/lib/pry/code/code_range.rb index a28bdedb..83f7b777 100644 --- a/lib/pry/code/code_range.rb +++ b/lib/pry/code/code_range.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Code # Represents a range of lines in a code listing. diff --git a/lib/pry/code/loc.rb b/lib/pry/code/loc.rb index 06721967..8cb3d8fe 100644 --- a/lib/pry/code/loc.rb +++ b/lib/pry/code/loc.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Code # Represents a line of code (which may, in fact, contain multiple lines if diff --git a/lib/pry/code_object.rb b/lib/pry/code_object.rb index c9eee2a4..931e28d6 100644 --- a/lib/pry/code_object.rb +++ b/lib/pry/code_object.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry # This class is responsible for taking a string (identifying a # command/class/method/etc) and returning the relevant type of object. diff --git a/lib/pry/color_printer.rb b/lib/pry/color_printer.rb index 0487c956..0a289014 100644 --- a/lib/pry/color_printer.rb +++ b/lib/pry/color_printer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'pp' require 'English' diff --git a/lib/pry/command.rb b/lib/pry/command.rb index 4e1674c7..6b274133 100644 --- a/lib/pry/command.rb +++ b/lib/pry/command.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'delegate' require 'shellwords' diff --git a/lib/pry/command_set.rb b/lib/pry/command_set.rb index 57d7884e..70ec2e53 100644 --- a/lib/pry/command_set.rb +++ b/lib/pry/command_set.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class NoCommandError < StandardError def initialize(match, owner) diff --git a/lib/pry/command_state.rb b/lib/pry/command_state.rb index 263d14d8..82c9ab95 100644 --- a/lib/pry/command_state.rb +++ b/lib/pry/command_state.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'ostruct' class Pry diff --git a/lib/pry/commands/amend_line.rb b/lib/pry/commands/amend_line.rb index 31791c61..002d4713 100644 --- a/lib/pry/commands/amend_line.rb +++ b/lib/pry/commands/amend_line.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class AmendLine < Pry::ClassCommand diff --git a/lib/pry/commands/bang.rb b/lib/pry/commands/bang.rb index 58bea56d..ca42834e 100644 --- a/lib/pry/commands/bang.rb +++ b/lib/pry/commands/bang.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Bang < Pry::ClassCommand diff --git a/lib/pry/commands/bang_pry.rb b/lib/pry/commands/bang_pry.rb index 728fe92a..39c148ea 100644 --- a/lib/pry/commands/bang_pry.rb +++ b/lib/pry/commands/bang_pry.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class BangPry < Pry::ClassCommand diff --git a/lib/pry/commands/cat.rb b/lib/pry/commands/cat.rb index f994e8cd..49dca46a 100644 --- a/lib/pry/commands/cat.rb +++ b/lib/pry/commands/cat.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Cat < Pry::ClassCommand diff --git a/lib/pry/commands/cat/abstract_formatter.rb b/lib/pry/commands/cat/abstract_formatter.rb index 8e39bd4b..013869e1 100644 --- a/lib/pry/commands/cat/abstract_formatter.rb +++ b/lib/pry/commands/cat/abstract_formatter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Cat diff --git a/lib/pry/commands/cat/exception_formatter.rb b/lib/pry/commands/cat/exception_formatter.rb index a4e70efd..c6d3b68a 100644 --- a/lib/pry/commands/cat/exception_formatter.rb +++ b/lib/pry/commands/cat/exception_formatter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Cat diff --git a/lib/pry/commands/cat/file_formatter.rb b/lib/pry/commands/cat/file_formatter.rb index 5b6c58c9..e8f1927b 100644 --- a/lib/pry/commands/cat/file_formatter.rb +++ b/lib/pry/commands/cat/file_formatter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Cat diff --git a/lib/pry/commands/cat/input_expression_formatter.rb b/lib/pry/commands/cat/input_expression_formatter.rb index 5c8102b8..4d8468fe 100644 --- a/lib/pry/commands/cat/input_expression_formatter.rb +++ b/lib/pry/commands/cat/input_expression_formatter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Cat diff --git a/lib/pry/commands/cd.rb b/lib/pry/commands/cd.rb index ec7defd6..d698e0a0 100644 --- a/lib/pry/commands/cd.rb +++ b/lib/pry/commands/cd.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Cd < Pry::ClassCommand diff --git a/lib/pry/commands/change_inspector.rb b/lib/pry/commands/change_inspector.rb index c4ec4fba..ea221f9f 100644 --- a/lib/pry/commands/change_inspector.rb +++ b/lib/pry/commands/change_inspector.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class ChangeInspector < Pry::ClassCommand diff --git a/lib/pry/commands/change_prompt.rb b/lib/pry/commands/change_prompt.rb index e3e59d14..89e85196 100644 --- a/lib/pry/commands/change_prompt.rb +++ b/lib/pry/commands/change_prompt.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class ChangePrompt < Pry::ClassCommand diff --git a/lib/pry/commands/clear_screen.rb b/lib/pry/commands/clear_screen.rb index 04ee762b..c0b78127 100644 --- a/lib/pry/commands/clear_screen.rb +++ b/lib/pry/commands/clear_screen.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class ClearScreen < Pry::ClassCommand diff --git a/lib/pry/commands/code_collector.rb b/lib/pry/commands/code_collector.rb index be0564a5..a827abf6 100644 --- a/lib/pry/commands/code_collector.rb +++ b/lib/pry/commands/code_collector.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class CodeCollector diff --git a/lib/pry/commands/disable_pry.rb b/lib/pry/commands/disable_pry.rb index 9dc970f4..0c597242 100644 --- a/lib/pry/commands/disable_pry.rb +++ b/lib/pry/commands/disable_pry.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class DisablePry < Pry::ClassCommand diff --git a/lib/pry/commands/easter_eggs.rb b/lib/pry/commands/easter_eggs.rb index b5883246..fba09743 100644 --- a/lib/pry/commands/easter_eggs.rb +++ b/lib/pry/commands/easter_eggs.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry Pry::Commands.instance_eval do command(%r{!s/(.*?)/(.*?)}, "") do |source, dest| diff --git a/lib/pry/commands/edit.rb b/lib/pry/commands/edit.rb index b2ecbf55..1819f8a4 100644 --- a/lib/pry/commands/edit.rb +++ b/lib/pry/commands/edit.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Edit < Pry::ClassCommand diff --git a/lib/pry/commands/edit/exception_patcher.rb b/lib/pry/commands/edit/exception_patcher.rb index 370a831d..6465d597 100644 --- a/lib/pry/commands/edit/exception_patcher.rb +++ b/lib/pry/commands/edit/exception_patcher.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Edit diff --git a/lib/pry/commands/edit/file_and_line_locator.rb b/lib/pry/commands/edit/file_and_line_locator.rb index c6724e4a..e3b8a616 100644 --- a/lib/pry/commands/edit/file_and_line_locator.rb +++ b/lib/pry/commands/edit/file_and_line_locator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Edit diff --git a/lib/pry/commands/exit.rb b/lib/pry/commands/exit.rb index 63922e2f..bbd67dd7 100644 --- a/lib/pry/commands/exit.rb +++ b/lib/pry/commands/exit.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Exit < Pry::ClassCommand diff --git a/lib/pry/commands/exit_all.rb b/lib/pry/commands/exit_all.rb index 0d834bd6..e30373b4 100644 --- a/lib/pry/commands/exit_all.rb +++ b/lib/pry/commands/exit_all.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class ExitAll < Pry::ClassCommand diff --git a/lib/pry/commands/exit_program.rb b/lib/pry/commands/exit_program.rb index 67291549..3b52438a 100644 --- a/lib/pry/commands/exit_program.rb +++ b/lib/pry/commands/exit_program.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class ExitProgram < Pry::ClassCommand diff --git a/lib/pry/commands/find_method.rb b/lib/pry/commands/find_method.rb index db5e6418..31a6a319 100644 --- a/lib/pry/commands/find_method.rb +++ b/lib/pry/commands/find_method.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class FindMethod < Pry::ClassCommand diff --git a/lib/pry/commands/fix_indent.rb b/lib/pry/commands/fix_indent.rb index 0a62fbe1..6c338691 100644 --- a/lib/pry/commands/fix_indent.rb +++ b/lib/pry/commands/fix_indent.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class FixIndent < Pry::ClassCommand diff --git a/lib/pry/commands/help.rb b/lib/pry/commands/help.rb index 778e6e6e..03f82895 100644 --- a/lib/pry/commands/help.rb +++ b/lib/pry/commands/help.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Help < Pry::ClassCommand diff --git a/lib/pry/commands/hist.rb b/lib/pry/commands/hist.rb index 69a2331b..390e992d 100644 --- a/lib/pry/commands/hist.rb +++ b/lib/pry/commands/hist.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Hist < Pry::ClassCommand diff --git a/lib/pry/commands/import_set.rb b/lib/pry/commands/import_set.rb index e4ff04d8..6d09fd8f 100644 --- a/lib/pry/commands/import_set.rb +++ b/lib/pry/commands/import_set.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class ImportSet < Pry::ClassCommand diff --git a/lib/pry/commands/jump_to.rb b/lib/pry/commands/jump_to.rb index b48fb5e6..eca7a988 100644 --- a/lib/pry/commands/jump_to.rb +++ b/lib/pry/commands/jump_to.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class JumpTo < Pry::ClassCommand diff --git a/lib/pry/commands/list_inspectors.rb b/lib/pry/commands/list_inspectors.rb index 41854a23..eefab994 100644 --- a/lib/pry/commands/list_inspectors.rb +++ b/lib/pry/commands/list_inspectors.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class ListInspectors < Pry::ClassCommand diff --git a/lib/pry/commands/ls.rb b/lib/pry/commands/ls.rb index 5f15c8fa..1a03db15 100644 --- a/lib/pry/commands/ls.rb +++ b/lib/pry/commands/ls.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Ls < Pry::ClassCommand diff --git a/lib/pry/commands/ls/constants.rb b/lib/pry/commands/ls/constants.rb index a07ff896..c0f50458 100644 --- a/lib/pry/commands/ls/constants.rb +++ b/lib/pry/commands/ls/constants.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Ls < Pry::ClassCommand diff --git a/lib/pry/commands/ls/formatter.rb b/lib/pry/commands/ls/formatter.rb index 8b0ae6b6..c5163ca5 100644 --- a/lib/pry/commands/ls/formatter.rb +++ b/lib/pry/commands/ls/formatter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Ls < Pry::ClassCommand diff --git a/lib/pry/commands/ls/globals.rb b/lib/pry/commands/ls/globals.rb index 77505be8..ab5c979d 100644 --- a/lib/pry/commands/ls/globals.rb +++ b/lib/pry/commands/ls/globals.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Ls < Pry::ClassCommand diff --git a/lib/pry/commands/ls/grep.rb b/lib/pry/commands/ls/grep.rb index e13aea68..425670e4 100644 --- a/lib/pry/commands/ls/grep.rb +++ b/lib/pry/commands/ls/grep.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Ls < Pry::ClassCommand diff --git a/lib/pry/commands/ls/instance_vars.rb b/lib/pry/commands/ls/instance_vars.rb index b5496ff2..9a35a359 100644 --- a/lib/pry/commands/ls/instance_vars.rb +++ b/lib/pry/commands/ls/instance_vars.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Ls < Pry::ClassCommand diff --git a/lib/pry/commands/ls/interrogatable.rb b/lib/pry/commands/ls/interrogatable.rb index 67a43373..390cfd11 100644 --- a/lib/pry/commands/ls/interrogatable.rb +++ b/lib/pry/commands/ls/interrogatable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Ls < Pry::ClassCommand diff --git a/lib/pry/commands/ls/jruby_hacks.rb b/lib/pry/commands/ls/jruby_hacks.rb index 656fbd84..b631dbb4 100644 --- a/lib/pry/commands/ls/jruby_hacks.rb +++ b/lib/pry/commands/ls/jruby_hacks.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Ls < Pry::ClassCommand diff --git a/lib/pry/commands/ls/local_names.rb b/lib/pry/commands/ls/local_names.rb index 8a2650d0..3f7c5faf 100644 --- a/lib/pry/commands/ls/local_names.rb +++ b/lib/pry/commands/ls/local_names.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Ls < Pry::ClassCommand diff --git a/lib/pry/commands/ls/local_vars.rb b/lib/pry/commands/ls/local_vars.rb index 2b8f4374..45605e69 100644 --- a/lib/pry/commands/ls/local_vars.rb +++ b/lib/pry/commands/ls/local_vars.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Ls < Pry::ClassCommand diff --git a/lib/pry/commands/ls/ls_entity.rb b/lib/pry/commands/ls/ls_entity.rb index 863ad876..197070a1 100644 --- a/lib/pry/commands/ls/ls_entity.rb +++ b/lib/pry/commands/ls/ls_entity.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Ls < Pry::ClassCommand diff --git a/lib/pry/commands/ls/methods.rb b/lib/pry/commands/ls/methods.rb index f8aaeda1..484f6647 100644 --- a/lib/pry/commands/ls/methods.rb +++ b/lib/pry/commands/ls/methods.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Ls < Pry::ClassCommand diff --git a/lib/pry/commands/ls/methods_helper.rb b/lib/pry/commands/ls/methods_helper.rb index 7ba52932..635cd214 100644 --- a/lib/pry/commands/ls/methods_helper.rb +++ b/lib/pry/commands/ls/methods_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Ls < Pry::ClassCommand diff --git a/lib/pry/commands/ls/self_methods.rb b/lib/pry/commands/ls/self_methods.rb index 5824926a..a8bf8a4a 100644 --- a/lib/pry/commands/ls/self_methods.rb +++ b/lib/pry/commands/ls/self_methods.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Ls < Pry::ClassCommand diff --git a/lib/pry/commands/nesting.rb b/lib/pry/commands/nesting.rb index 5abe207b..93da1572 100644 --- a/lib/pry/commands/nesting.rb +++ b/lib/pry/commands/nesting.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Nesting < Pry::ClassCommand diff --git a/lib/pry/commands/play.rb b/lib/pry/commands/play.rb index 57d22c10..e68b2e15 100644 --- a/lib/pry/commands/play.rb +++ b/lib/pry/commands/play.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Play < Pry::ClassCommand diff --git a/lib/pry/commands/pry_backtrace.rb b/lib/pry/commands/pry_backtrace.rb index 559096fc..44b6e3b7 100644 --- a/lib/pry/commands/pry_backtrace.rb +++ b/lib/pry/commands/pry_backtrace.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class PryBacktrace < Pry::ClassCommand diff --git a/lib/pry/commands/pry_version.rb b/lib/pry/commands/pry_version.rb index 3784a4c8..40408733 100644 --- a/lib/pry/commands/pry_version.rb +++ b/lib/pry/commands/pry_version.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Version < Pry::ClassCommand diff --git a/lib/pry/commands/raise_up.rb b/lib/pry/commands/raise_up.rb index 54510266..f002636e 100644 --- a/lib/pry/commands/raise_up.rb +++ b/lib/pry/commands/raise_up.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry # N.B. using a regular expresion here so that "raise-up 'foo'" does the right thing. class Command diff --git a/lib/pry/commands/reload_code.rb b/lib/pry/commands/reload_code.rb index 66264854..85f4260d 100644 --- a/lib/pry/commands/reload_code.rb +++ b/lib/pry/commands/reload_code.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class ReloadCode < Pry::ClassCommand diff --git a/lib/pry/commands/reset.rb b/lib/pry/commands/reset.rb index 91599b64..e668e59f 100644 --- a/lib/pry/commands/reset.rb +++ b/lib/pry/commands/reset.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Reset < Pry::ClassCommand diff --git a/lib/pry/commands/ri.rb b/lib/pry/commands/ri.rb index 48cbf0cb..b9cb5907 100644 --- a/lib/pry/commands/ri.rb +++ b/lib/pry/commands/ri.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'stringio' class Pry diff --git a/lib/pry/commands/save_file.rb b/lib/pry/commands/save_file.rb index 1f91a99c..3a6ecd5d 100644 --- a/lib/pry/commands/save_file.rb +++ b/lib/pry/commands/save_file.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class SaveFile < Pry::ClassCommand diff --git a/lib/pry/commands/shell_command.rb b/lib/pry/commands/shell_command.rb index f12dea02..7b868607 100644 --- a/lib/pry/commands/shell_command.rb +++ b/lib/pry/commands/shell_command.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class ShellCommand < Pry::ClassCommand diff --git a/lib/pry/commands/shell_mode.rb b/lib/pry/commands/shell_mode.rb index 011a6fd3..a71adb94 100644 --- a/lib/pry/commands/shell_mode.rb +++ b/lib/pry/commands/shell_mode.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class ShellMode < Pry::ClassCommand diff --git a/lib/pry/commands/show_doc.rb b/lib/pry/commands/show_doc.rb index 40e558a9..c0f183b2 100644 --- a/lib/pry/commands/show_doc.rb +++ b/lib/pry/commands/show_doc.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class ShowDoc < Command::ShowInfo diff --git a/lib/pry/commands/show_info.rb b/lib/pry/commands/show_info.rb index 2f78d0c3..4e982af8 100644 --- a/lib/pry/commands/show_info.rb +++ b/lib/pry/commands/show_info.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class ShowInfo < Pry::ClassCommand diff --git a/lib/pry/commands/show_input.rb b/lib/pry/commands/show_input.rb index 176808c3..bc44806f 100644 --- a/lib/pry/commands/show_input.rb +++ b/lib/pry/commands/show_input.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class ShowInput < Pry::ClassCommand diff --git a/lib/pry/commands/show_source.rb b/lib/pry/commands/show_source.rb index 9390fb10..7df865c6 100644 --- a/lib/pry/commands/show_source.rb +++ b/lib/pry/commands/show_source.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class ShowSource < Command::ShowInfo diff --git a/lib/pry/commands/stat.rb b/lib/pry/commands/stat.rb index 2c22f32a..055242a5 100644 --- a/lib/pry/commands/stat.rb +++ b/lib/pry/commands/stat.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Stat < Pry::ClassCommand diff --git a/lib/pry/commands/switch_to.rb b/lib/pry/commands/switch_to.rb index 84510701..448f2cd3 100644 --- a/lib/pry/commands/switch_to.rb +++ b/lib/pry/commands/switch_to.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class SwitchTo < Pry::ClassCommand diff --git a/lib/pry/commands/toggle_color.rb b/lib/pry/commands/toggle_color.rb index b254d8e9..67d8a8ca 100644 --- a/lib/pry/commands/toggle_color.rb +++ b/lib/pry/commands/toggle_color.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class ToggleColor < Pry::ClassCommand diff --git a/lib/pry/commands/watch_expression.rb b/lib/pry/commands/watch_expression.rb index 95a41432..f732a53f 100644 --- a/lib/pry/commands/watch_expression.rb +++ b/lib/pry/commands/watch_expression.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class WatchExpression < Pry::ClassCommand diff --git a/lib/pry/commands/watch_expression/expression.rb b/lib/pry/commands/watch_expression/expression.rb index ee0ff457..3b0d605a 100644 --- a/lib/pry/commands/watch_expression/expression.rb +++ b/lib/pry/commands/watch_expression/expression.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class WatchExpression diff --git a/lib/pry/commands/whereami.rb b/lib/pry/commands/whereami.rb index a8b589cb..5adc187a 100644 --- a/lib/pry/commands/whereami.rb +++ b/lib/pry/commands/whereami.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'method_source' class Pry diff --git a/lib/pry/commands/wtf.rb b/lib/pry/commands/wtf.rb index 3ce86265..3e25dca3 100644 --- a/lib/pry/commands/wtf.rb +++ b/lib/pry/commands/wtf.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Command class Wtf < Pry::ClassCommand diff --git a/lib/pry/config.rb b/lib/pry/config.rb index feeb4b40..18626363 100644 --- a/lib/pry/config.rb +++ b/lib/pry/config.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'ostruct' class Pry diff --git a/lib/pry/config/attributable.rb b/lib/pry/config/attributable.rb index 4ff4e7cb..28391ef0 100644 --- a/lib/pry/config/attributable.rb +++ b/lib/pry/config/attributable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Config # Attributable provides the ability to create "attribute" diff --git a/lib/pry/config/lazy_value.rb b/lib/pry/config/lazy_value.rb index 8c2330ac..5b776068 100644 --- a/lib/pry/config/lazy_value.rb +++ b/lib/pry/config/lazy_value.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Config # LazyValue is a Proc (block) wrapper. It is meant to be used as a diff --git a/lib/pry/config/memoized_value.rb b/lib/pry/config/memoized_value.rb index a8f61d15..670f45b9 100644 --- a/lib/pry/config/memoized_value.rb +++ b/lib/pry/config/memoized_value.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Config # MemoizedValue is a Proc (block) wrapper. It is meant to be used as a diff --git a/lib/pry/config/value.rb b/lib/pry/config/value.rb index 3afec386..b646d97a 100644 --- a/lib/pry/config/value.rb +++ b/lib/pry/config/value.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Config # Value holds a value for the given attribute and decides how it should diff --git a/lib/pry/control_d_handler.rb b/lib/pry/control_d_handler.rb index f9b93003..cee15ba5 100644 --- a/lib/pry/control_d_handler.rb +++ b/lib/pry/control_d_handler.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry # @api private # @since ?.?.? diff --git a/lib/pry/core_extensions.rb b/lib/pry/core_extensions.rb index 7d10e3eb..e5063a05 100644 --- a/lib/pry/core_extensions.rb +++ b/lib/pry/core_extensions.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry # @return [Array] Code of the method used when implementing Pry's # __binding__, along with line indication to be used with instance_eval (and diff --git a/lib/pry/editor.rb b/lib/pry/editor.rb index bf10d984..df3422a0 100644 --- a/lib/pry/editor.rb +++ b/lib/pry/editor.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'shellwords' class Pry diff --git a/lib/pry/exception_handler.rb b/lib/pry/exception_handler.rb index 9b50fe80..3dddc6b5 100644 --- a/lib/pry/exception_handler.rb +++ b/lib/pry/exception_handler.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry # @api private # @since ?.?.? diff --git a/lib/pry/exceptions.rb b/lib/pry/exceptions.rb index bec48c28..eac1c009 100644 --- a/lib/pry/exceptions.rb +++ b/lib/pry/exceptions.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry # As a REPL, we often want to catch any unexpected exceptions that may have # been raised; however we don't want to go overboard and prevent the user diff --git a/lib/pry/forwardable.rb b/lib/pry/forwardable.rb index 1e0674d4..3ae59a89 100644 --- a/lib/pry/forwardable.rb +++ b/lib/pry/forwardable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry module Forwardable require 'forwardable' diff --git a/lib/pry/helpers.rb b/lib/pry/helpers.rb index faaced9b..4bbbaafc 100644 --- a/lib/pry/helpers.rb +++ b/lib/pry/helpers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "pry/helpers/base_helpers" require "pry/helpers/options_helpers" require "pry/helpers/command_helpers" diff --git a/lib/pry/helpers/base_helpers.rb b/lib/pry/helpers/base_helpers.rb index 5d75a50a..84d97616 100644 --- a/lib/pry/helpers/base_helpers.rb +++ b/lib/pry/helpers/base_helpers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry module Helpers module BaseHelpers diff --git a/lib/pry/helpers/command_helpers.rb b/lib/pry/helpers/command_helpers.rb index 15798c64..374f6b20 100644 --- a/lib/pry/helpers/command_helpers.rb +++ b/lib/pry/helpers/command_helpers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'tempfile' class Pry diff --git a/lib/pry/helpers/documentation_helpers.rb b/lib/pry/helpers/documentation_helpers.rb index b56d8e0d..1ce6be2b 100644 --- a/lib/pry/helpers/documentation_helpers.rb +++ b/lib/pry/helpers/documentation_helpers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry module Helpers # This class contains methods useful for extracting diff --git a/lib/pry/helpers/options_helpers.rb b/lib/pry/helpers/options_helpers.rb index 4c31e9f0..1f93c8db 100644 --- a/lib/pry/helpers/options_helpers.rb +++ b/lib/pry/helpers/options_helpers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry module Helpers module OptionsHelpers diff --git a/lib/pry/helpers/platform.rb b/lib/pry/helpers/platform.rb index b7e98555..f4b3dccb 100644 --- a/lib/pry/helpers/platform.rb +++ b/lib/pry/helpers/platform.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rbconfig' class Pry diff --git a/lib/pry/helpers/table.rb b/lib/pry/helpers/table.rb index 6835fa50..59297f9c 100644 --- a/lib/pry/helpers/table.rb +++ b/lib/pry/helpers/table.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry module Helpers def self.tablify_or_one_line(heading, things, config = Pry.config) diff --git a/lib/pry/helpers/text.rb b/lib/pry/helpers/text.rb index cefeb234..b1fee03f 100644 --- a/lib/pry/helpers/text.rb +++ b/lib/pry/helpers/text.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry module Helpers # The methods defined on {Text} are available to custom commands via diff --git a/lib/pry/history.rb b/lib/pry/history.rb index 7200a69d..19e90454 100644 --- a/lib/pry/history.rb +++ b/lib/pry/history.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry # The History class is responsible for maintaining the user's input history, # both internally and within Readline. diff --git a/lib/pry/hooks.rb b/lib/pry/hooks.rb index 38d70281..47ffd97f 100644 --- a/lib/pry/hooks.rb +++ b/lib/pry/hooks.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry # Implements a hooks system for Pry. A hook is a callable that is associated # with an event. A number of events are currently provided by Pry, these diff --git a/lib/pry/indent.rb b/lib/pry/indent.rb index c56d032b..306c82d0 100644 --- a/lib/pry/indent.rb +++ b/lib/pry/indent.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry ## # Pry::Indent is a class that can be used to indent a number of lines diff --git a/lib/pry/input_completer.rb b/lib/pry/input_completer.rb index 1b54613d..16d55fb1 100644 --- a/lib/pry/input_completer.rb +++ b/lib/pry/input_completer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # taken from irb # Implements tab completion for Readline in Pry class Pry diff --git a/lib/pry/input_lock.rb b/lib/pry/input_lock.rb index a1dbc259..806dd53e 100644 --- a/lib/pry/input_lock.rb +++ b/lib/pry/input_lock.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry # There is one InputLock per input (such as STDIN) as two REPLs on the same # input makes things delirious. InputLock serializes accesses to the input so diff --git a/lib/pry/inspector.rb b/lib/pry/inspector.rb index ee993018..6e8a692c 100644 --- a/lib/pry/inspector.rb +++ b/lib/pry/inspector.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Inspector MAP = { diff --git a/lib/pry/last_exception.rb b/lib/pry/last_exception.rb index 61cb3844..4cc0f56b 100644 --- a/lib/pry/last_exception.rb +++ b/lib/pry/last_exception.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # # {Pry::LastException} is a proxy class who wraps an Exception object for # {Pry#last_exception}. it extends the exception object with methods that diff --git a/lib/pry/method.rb b/lib/pry/method.rb index 3301ae6f..aefe61ac 100644 --- a/lib/pry/method.rb +++ b/lib/pry/method.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'method_source' class Pry diff --git a/lib/pry/method/disowned.rb b/lib/pry/method/disowned.rb index 411bdd95..477e596a 100644 --- a/lib/pry/method/disowned.rb +++ b/lib/pry/method/disowned.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Method # A Disowned Method is one that's been removed from the class on which it was defined. diff --git a/lib/pry/method/patcher.rb b/lib/pry/method/patcher.rb index f0b93837..656039d0 100644 --- a/lib/pry/method/patcher.rb +++ b/lib/pry/method/patcher.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Method class Patcher diff --git a/lib/pry/method/weird_method_locator.rb b/lib/pry/method/weird_method_locator.rb index d559f36f..e4f58c8f 100644 --- a/lib/pry/method/weird_method_locator.rb +++ b/lib/pry/method/weird_method_locator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Method # This class is responsible for locating the *real* `Pry::Method` diff --git a/lib/pry/object_path.rb b/lib/pry/object_path.rb index 90f994b0..b200c2bb 100644 --- a/lib/pry/object_path.rb +++ b/lib/pry/object_path.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'strscan' class Pry diff --git a/lib/pry/output.rb b/lib/pry/output.rb index c6bc784b..6ecd8752 100644 --- a/lib/pry/output.rb +++ b/lib/pry/output.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Output attr_reader :pry_instance diff --git a/lib/pry/pager.rb b/lib/pry/pager.rb index 4ebdcb66..966e06c1 100644 --- a/lib/pry/pager.rb +++ b/lib/pry/pager.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # A pager is an `IO`-like object that accepts text and either prints it # immediately, prints it one page at a time, or streams it to an external # program to print one page at a time. diff --git a/lib/pry/plugins.rb b/lib/pry/plugins.rb index 56a1bed8..c29894d4 100644 --- a/lib/pry/plugins.rb +++ b/lib/pry/plugins.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'ostruct' class Pry diff --git a/lib/pry/prompt.rb b/lib/pry/prompt.rb index 1e47174f..656e4e2e 100644 --- a/lib/pry/prompt.rb +++ b/lib/pry/prompt.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry # Prompt represents the Pry prompt, which can be used with Readline-like # libraries. It defines a few default prompts (default prompt, simple prompt, diff --git a/lib/pry/pry_class.rb b/lib/pry/pry_class.rb index e2ca9b38..3e8792c8 100644 --- a/lib/pry/pry_class.rb +++ b/lib/pry/pry_class.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'stringio' require 'pathname' diff --git a/lib/pry/pry_instance.rb b/lib/pry/pry_instance.rb index 41eddb78..b46e703d 100644 --- a/lib/pry/pry_instance.rb +++ b/lib/pry/pry_instance.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'method_source' require 'ostruct' diff --git a/lib/pry/repl.rb b/lib/pry/repl.rb index 7c408407..d226641b 100644 --- a/lib/pry/repl.rb +++ b/lib/pry/repl.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class REPL extend Pry::Forwardable diff --git a/lib/pry/repl_file_loader.rb b/lib/pry/repl_file_loader.rb index 57942119..3a06fe7a 100644 --- a/lib/pry/repl_file_loader.rb +++ b/lib/pry/repl_file_loader.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry # A class to manage the loading of files through the REPL loop. # This is an interesting trick as it processes your file as if it diff --git a/lib/pry/ring.rb b/lib/pry/ring.rb index e40248ff..a61d077a 100644 --- a/lib/pry/ring.rb +++ b/lib/pry/ring.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry # A ring is a thread-safe fixed-capacity array to which you can only add # elements. Older entries are overwritten as you add new elements, so that the diff --git a/lib/pry/slop.rb b/lib/pry/slop.rb index 6fda3971..bf51f5a1 100644 --- a/lib/pry/slop.rb +++ b/lib/pry/slop.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry # rubocop:disable Metrics/ClassLength class Slop diff --git a/lib/pry/slop/commands.rb b/lib/pry/slop/commands.rb index f320c4cc..4c254270 100644 --- a/lib/pry/slop/commands.rb +++ b/lib/pry/slop/commands.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Slop class Commands diff --git a/lib/pry/slop/option.rb b/lib/pry/slop/option.rb index fc77ba32..8a0df7e1 100644 --- a/lib/pry/slop/option.rb +++ b/lib/pry/slop/option.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Slop class Option diff --git a/lib/pry/syntax_highlighter.rb b/lib/pry/syntax_highlighter.rb index 3eb0dd5b..f7f3375b 100644 --- a/lib/pry/syntax_highlighter.rb +++ b/lib/pry/syntax_highlighter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'coderay' class Pry diff --git a/lib/pry/system_command_handler.rb b/lib/pry/system_command_handler.rb index 24bea2e3..fcbfeb57 100644 --- a/lib/pry/system_command_handler.rb +++ b/lib/pry/system_command_handler.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry # @api private # @since ?.?.? diff --git a/lib/pry/terminal.rb b/lib/pry/terminal.rb index 59a13f41..c09c6178 100644 --- a/lib/pry/terminal.rb +++ b/lib/pry/terminal.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class Terminal class << self diff --git a/lib/pry/testable.rb b/lib/pry/testable.rb index 5dbb9269..e3bafc22 100644 --- a/lib/pry/testable.rb +++ b/lib/pry/testable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # good idea ??? # if you're testing pry plugin you should require pry by yourself, no? require 'pry' unless defined?(Pry) diff --git a/lib/pry/testable/evalable.rb b/lib/pry/testable/evalable.rb index 08f68a35..36d3aa81 100644 --- a/lib/pry/testable/evalable.rb +++ b/lib/pry/testable/evalable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry module Testable module Evalable diff --git a/lib/pry/testable/mockable.rb b/lib/pry/testable/mockable.rb index bc88c92b..49581163 100644 --- a/lib/pry/testable/mockable.rb +++ b/lib/pry/testable/mockable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'stringio' class Pry diff --git a/lib/pry/testable/pry_tester.rb b/lib/pry/testable/pry_tester.rb index 73a6e845..55f0b558 100644 --- a/lib/pry/testable/pry_tester.rb +++ b/lib/pry/testable/pry_tester.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'stringio' class Pry diff --git a/lib/pry/testable/utility.rb b/lib/pry/testable/utility.rb index 8403d1df..4c358c88 100644 --- a/lib/pry/testable/utility.rb +++ b/lib/pry/testable/utility.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'tempfile' class Pry diff --git a/lib/pry/testable/variables.rb b/lib/pry/testable/variables.rb index ba285682..deb156b6 100644 --- a/lib/pry/testable/variables.rb +++ b/lib/pry/testable/variables.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry module Testable module Variables diff --git a/lib/pry/version.rb b/lib/pry/version.rb index 4dbb7254..231d89d9 100644 --- a/lib/pry/version.rb +++ b/lib/pry/version.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry VERSION = '0.12.2'.freeze end diff --git a/lib/pry/warning.rb b/lib/pry/warning.rb index 5585ce20..b37478f4 100644 --- a/lib/pry/warning.rb +++ b/lib/pry/warning.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry # @api private # @since ?.?.? diff --git a/lib/pry/wrapped_module.rb b/lib/pry/wrapped_module.rb index 8261b3fb..c07ba682 100644 --- a/lib/pry/wrapped_module.rb +++ b/lib/pry/wrapped_module.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class << self # If the given object is a `Pry::WrappedModule`, return it unaltered. If it's diff --git a/lib/pry/wrapped_module/candidate.rb b/lib/pry/wrapped_module/candidate.rb index a84e7ba3..509b75bc 100644 --- a/lib/pry/wrapped_module/candidate.rb +++ b/lib/pry/wrapped_module/candidate.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Pry class WrappedModule # This class represents a single candidate for a module/class definition. diff --git a/pry.gemspec b/pry.gemspec index 23901106..d5acfb5d 100644 --- a/pry.gemspec +++ b/pry.gemspec @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path('../lib/pry/version', __FILE__) Gem::Specification.new do |s| diff --git a/spec/block_command_spec.rb b/spec/block_command_spec.rb index 1a57e96a..915cbe58 100644 --- a/spec/block_command_spec.rb +++ b/spec/block_command_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe Pry::BlockCommand do subject { Class.new(described_class).new } diff --git a/spec/class_command_spec.rb b/spec/class_command_spec.rb index 8d7d7484..59151d62 100644 --- a/spec/class_command_spec.rb +++ b/spec/class_command_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe Pry::ClassCommand do describe ".inherited" do context "when match is defined" do diff --git a/spec/cli_spec.rb b/spec/cli_spec.rb index b9c8ee46..93625f79 100644 --- a/spec/cli_spec.rb +++ b/spec/cli_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe Pry::CLI do before { described_class.reset } diff --git a/spec/code_object_spec.rb b/spec/code_object_spec.rb index 8cee8b66..ef670e00 100644 --- a/spec/code_object_spec.rb +++ b/spec/code_object_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe Pry::CodeObject do let(:pry) do Pry.new.tap { |p| p.binding_stack = [binding] } diff --git a/spec/code_spec.rb b/spec/code_spec.rb index 0d2c2d4d..4ae2ca0b 100644 --- a/spec/code_spec.rb +++ b/spec/code_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'method_source' require 'tempfile' diff --git a/spec/color_printer_spec.rb b/spec/color_printer_spec.rb index 8347a348..3c9048ec 100644 --- a/spec/color_printer_spec.rb +++ b/spec/color_printer_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe Pry::ColorPrinter do let(:output) { StringIO.new } diff --git a/spec/command_integration_spec.rb b/spec/command_integration_spec.rb index 98e799a4..c1b63052 100644 --- a/spec/command_integration_spec.rb +++ b/spec/command_integration_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "commands" do before do @str_output = StringIO.new diff --git a/spec/command_set_spec.rb b/spec/command_set_spec.rb index 1cc381d6..fc67d140 100644 --- a/spec/command_set_spec.rb +++ b/spec/command_set_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe Pry::CommandSet do let(:set) do Pry::CommandSet.new { import(Pry::Commands) } diff --git a/spec/command_spec.rb b/spec/command_spec.rb index 56ee27b3..b676be81 100644 --- a/spec/command_spec.rb +++ b/spec/command_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'stringio' RSpec.describe Pry::Command do diff --git a/spec/command_state_spec.rb b/spec/command_state_spec.rb index 10097b2b..264b772c 100644 --- a/spec/command_state_spec.rb +++ b/spec/command_state_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe Pry::CommandState do describe ".default" do it "returns the default command state" do diff --git a/spec/commands/amend_line_spec.rb b/spec/commands/amend_line_spec.rb index 29b68f80..edf50f23 100644 --- a/spec/commands/amend_line_spec.rb +++ b/spec/commands/amend_line_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "amend-line" do before do @t = pry_tester diff --git a/spec/commands/bang_spec.rb b/spec/commands/bang_spec.rb index d48bd6da..e07964ec 100644 --- a/spec/commands/bang_spec.rb +++ b/spec/commands/bang_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "!" do before do @t = pry_tester diff --git a/spec/commands/cat/file_formatter_spec.rb b/spec/commands/cat/file_formatter_spec.rb index a255a54f..4360f071 100644 --- a/spec/commands/cat/file_formatter_spec.rb +++ b/spec/commands/cat/file_formatter_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Pry::Command::Cat::FileFormatter do before do @p = Pry.new diff --git a/spec/commands/cat_spec.rb b/spec/commands/cat_spec.rb index a2c3ecba..8ed3ed8a 100644 --- a/spec/commands/cat_spec.rb +++ b/spec/commands/cat_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'tempfile' describe "cat" do diff --git a/spec/commands/cd_spec.rb b/spec/commands/cd_spec.rb index 5ea64861..9777bddb 100644 --- a/spec/commands/cd_spec.rb +++ b/spec/commands/cd_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe 'cd' do before do @o = Object.new diff --git a/spec/commands/clear_screen_spec.rb b/spec/commands/clear_screen_spec.rb index 152201d2..663e3717 100644 --- a/spec/commands/clear_screen_spec.rb +++ b/spec/commands/clear_screen_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe "clear-screen" do before do @t = pry_tester diff --git a/spec/commands/disable_pry_spec.rb b/spec/commands/disable_pry_spec.rb index af5fa80a..db90a5cc 100644 --- a/spec/commands/disable_pry_spec.rb +++ b/spec/commands/disable_pry_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "disable-pry" do before do @t = pry_tester diff --git a/spec/commands/edit_spec.rb b/spec/commands/edit_spec.rb index cc741053..925a9425 100644 --- a/spec/commands/edit_spec.rb +++ b/spec/commands/edit_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'pathname' require 'tempfile' diff --git a/spec/commands/exit_all_spec.rb b/spec/commands/exit_all_spec.rb index 640fa17f..aa3c705b 100644 --- a/spec/commands/exit_all_spec.rb +++ b/spec/commands/exit_all_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "exit-all" do before { @pry = Pry.new } diff --git a/spec/commands/exit_program_spec.rb b/spec/commands/exit_program_spec.rb index dcb2bb71..58bda763 100644 --- a/spec/commands/exit_program_spec.rb +++ b/spec/commands/exit_program_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "exit-program" do it 'should raise SystemExit' do expect { pry_eval('exit-program') }.to raise_error SystemExit diff --git a/spec/commands/exit_spec.rb b/spec/commands/exit_spec.rb index 2b4da7e5..3bbf5f5c 100644 --- a/spec/commands/exit_spec.rb +++ b/spec/commands/exit_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "exit" do before { @pry = Pry.new(target: :outer, output: StringIO.new) } diff --git a/spec/commands/find_method_spec.rb b/spec/commands/find_method_spec.rb index f584f3b5..7be22752 100644 --- a/spec/commands/find_method_spec.rb +++ b/spec/commands/find_method_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "find-method" do MyKlass = Class.new do def hello diff --git a/spec/commands/help_spec.rb b/spec/commands/help_spec.rb index 59e451c9..0e748a00 100644 --- a/spec/commands/help_spec.rb +++ b/spec/commands/help_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "help" do before do @oldset = Pry.config.commands diff --git a/spec/commands/hist_spec.rb b/spec/commands/hist_spec.rb index 558b4f99..2fbbffb6 100644 --- a/spec/commands/hist_spec.rb +++ b/spec/commands/hist_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "hist" do before do Pry.history.clear diff --git a/spec/commands/jump_to_spec.rb b/spec/commands/jump_to_spec.rb index 48c82f5f..c8f8f5c7 100644 --- a/spec/commands/jump_to_spec.rb +++ b/spec/commands/jump_to_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe "jump-to" do let(:obj) { Object.new } diff --git a/spec/commands/ls_spec.rb b/spec/commands/ls_spec.rb index e147f726..f3ef8f9b 100644 --- a/spec/commands/ls_spec.rb +++ b/spec/commands/ls_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "ls" do describe "bug #1407" do it "behaves as usual when a method of the same name exists." do diff --git a/spec/commands/play_spec.rb b/spec/commands/play_spec.rb index f82bc645..000f6fe5 100644 --- a/spec/commands/play_spec.rb +++ b/spec/commands/play_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # This command needs a TONNE more tests for it, but i can't figure out # how to do them yet, and i really want to release. Sorry. Someone # come along and do a better job. diff --git a/spec/commands/raise_up_spec.rb b/spec/commands/raise_up_spec.rb index 39b2f127..dbb45f91 100644 --- a/spec/commands/raise_up_spec.rb +++ b/spec/commands/raise_up_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "raise-up" do before do @self = "Pad.self = self" diff --git a/spec/commands/reload_code_spec.rb b/spec/commands/reload_code_spec.rb index b7fe743f..845ee117 100644 --- a/spec/commands/reload_code_spec.rb +++ b/spec/commands/reload_code_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "reload_code" do describe "reload_current_file" do it 'raises an error source code not found' do diff --git a/spec/commands/ri_command_spec.rb b/spec/commands/ri_command_spec.rb index 9fc4468a..0429019d 100644 --- a/spec/commands/ri_command_spec.rb +++ b/spec/commands/ri_command_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "ri" do it "prints an error message without an argument" do expect(pry_eval("ri")).to include( diff --git a/spec/commands/save_file_spec.rb b/spec/commands/save_file_spec.rb index 902ac926..9dd80966 100644 --- a/spec/commands/save_file_spec.rb +++ b/spec/commands/save_file_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'tempfile' describe "save-file" do diff --git a/spec/commands/shell_command_spec.rb b/spec/commands/shell_command_spec.rb index 62526b3c..f66207b4 100644 --- a/spec/commands/shell_command_spec.rb +++ b/spec/commands/shell_command_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Pry::Command::ShellCommand do describe 'cd' do before do diff --git a/spec/commands/show_doc_spec.rb b/spec/commands/show_doc_spec.rb index e0bba4da..67ce1bc9 100644 --- a/spec/commands/show_doc_spec.rb +++ b/spec/commands/show_doc_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "fixtures/show_source_doc_examples" describe "show-doc" do diff --git a/spec/commands/show_input_spec.rb b/spec/commands/show_input_spec.rb index 8fc82b3a..3953dbf3 100644 --- a/spec/commands/show_input_spec.rb +++ b/spec/commands/show_input_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "show-input" do before do @t = pry_tester diff --git a/spec/commands/show_source_spec.rb b/spec/commands/show_source_spec.rb index 13bb86e9..fc921a9d 100644 --- a/spec/commands/show_source_spec.rb +++ b/spec/commands/show_source_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "fixtures/show_source_doc_examples" describe "show-source" do diff --git a/spec/commands/watch_expression_spec.rb b/spec/commands/watch_expression_spec.rb index 04f26d10..08f3d107 100644 --- a/spec/commands/watch_expression_spec.rb +++ b/spec/commands/watch_expression_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "watch expression" do # Custom eval that will: # 1) Create an instance of pry that can use for multiple calls diff --git a/spec/commands/whereami_spec.rb b/spec/commands/whereami_spec.rb index 1ccac2ef..aff868ce 100644 --- a/spec/commands/whereami_spec.rb +++ b/spec/commands/whereami_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'method_source' describe "whereami" do diff --git a/spec/commands/wtf_spec.rb b/spec/commands/wtf_spec.rb index 0a224fa5..ace8cbf3 100644 --- a/spec/commands/wtf_spec.rb +++ b/spec/commands/wtf_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "wtf?!" do let(:tester) do pry_tester do diff --git a/spec/completion_spec.rb b/spec/completion_spec.rb index 4216ea74..5df577f5 100644 --- a/spec/completion_spec.rb +++ b/spec/completion_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "readline" unless defined?(Readline) require "pry/input_completer" diff --git a/spec/config/attributable_spec.rb b/spec/config/attributable_spec.rb index c0c2b167..9b6ea561 100644 --- a/spec/config/attributable_spec.rb +++ b/spec/config/attributable_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe Pry::Config::Attributable do subject { klass.new } diff --git a/spec/config/lazy_value_spec.rb b/spec/config/lazy_value_spec.rb index dc2aaa1e..7b9f28f3 100644 --- a/spec/config/lazy_value_spec.rb +++ b/spec/config/lazy_value_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe Pry::Config::LazyValue do describe "#call" do subject { described_class.new { rand } } diff --git a/spec/config/memoized_value_spec.rb b/spec/config/memoized_value_spec.rb index 1601bff2..22e278dc 100644 --- a/spec/config/memoized_value_spec.rb +++ b/spec/config/memoized_value_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe Pry::Config::MemoizedValue do describe "#call" do subject { described_class.new { rand } } diff --git a/spec/config/value_spec.rb b/spec/config/value_spec.rb index efb8eca4..7ddd0151 100644 --- a/spec/config/value_spec.rb +++ b/spec/config/value_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe Pry::Config::Value do describe "#call" do context "when given value is a MemoizedValue" do diff --git a/spec/config_spec.rb b/spec/config_spec.rb index 13aa52aa..d42d4d1e 100644 --- a/spec/config_spec.rb +++ b/spec/config_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe Pry::Config do specify { expect(subject.input).to respond_to(:readline) } specify { expect(subject.output).to be_an(IO) } diff --git a/spec/control_d_handler_spec.rb b/spec/control_d_handler_spec.rb index 030cefd6..1306bdc3 100644 --- a/spec/control_d_handler_spec.rb +++ b/spec/control_d_handler_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe Pry::ControlDHandler do context "when given eval string is non-empty" do let(:pry_instance) do diff --git a/spec/documentation_helper_spec.rb b/spec/documentation_helper_spec.rb index c6395774..8da62a29 100644 --- a/spec/documentation_helper_spec.rb +++ b/spec/documentation_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Pry::Helpers::DocumentationHelpers do before do @helper = Pry::Helpers::DocumentationHelpers diff --git a/spec/editor_spec.rb b/spec/editor_spec.rb index ea4c31d7..3410cbe7 100644 --- a/spec/editor_spec.rb +++ b/spec/editor_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'pathname' describe Pry::Editor do diff --git a/spec/exception_handler_spec.rb b/spec/exception_handler_spec.rb index 62138153..b1608509 100644 --- a/spec/exception_handler_spec.rb +++ b/spec/exception_handler_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe Pry::ExceptionHandler do describe ".handle_exception" do let(:output) { StringIO.new } diff --git a/spec/fixtures/Gemfile b/spec/fixtures/Gemfile index 20b4d4ae..ebc45888 100644 --- a/spec/fixtures/Gemfile +++ b/spec/fixtures/Gemfile @@ -1 +1,3 @@ +# frozen_string_literal: true + source 'https://rubygems.org' diff --git a/spec/fixtures/candidate_helper1.rb b/spec/fixtures/candidate_helper1.rb index 7833d52f..ec431807 100644 --- a/spec/fixtures/candidate_helper1.rb +++ b/spec/fixtures/candidate_helper1.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # rank 0 class CandidateTest def test1; end diff --git a/spec/fixtures/candidate_helper2.rb b/spec/fixtures/candidate_helper2.rb index 9de72c8d..06bb0475 100644 --- a/spec/fixtures/candidate_helper2.rb +++ b/spec/fixtures/candidate_helper2.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # rank 1 class CandidateTest def test4; end diff --git a/spec/fixtures/show_source_doc_examples.rb b/spec/fixtures/show_source_doc_examples.rb index bb24960c..dad53e06 100644 --- a/spec/fixtures/show_source_doc_examples.rb +++ b/spec/fixtures/show_source_doc_examples.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # used by show_source_spec.rb and show_doc_spec.rb class TestClassForShowSource # doc diff --git a/spec/fixtures/whereami_helper.rb b/spec/fixtures/whereami_helper.rb index 6aea145e..be6d28bb 100644 --- a/spec/fixtures/whereami_helper.rb +++ b/spec/fixtures/whereami_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # rubocop:disable Layout/EmptyLineBetweenDefs class Cor def a; end diff --git a/spec/helpers/command_helpers_spec.rb b/spec/helpers/command_helpers_spec.rb index 0e696cc5..7cc8f53d 100644 --- a/spec/helpers/command_helpers_spec.rb +++ b/spec/helpers/command_helpers_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe Pry::Helpers::CommandHelpers do describe "#temp_file" do it "yields a tempfile" do diff --git a/spec/helpers/table_spec.rb b/spec/helpers/table_spec.rb index 8aceac9c..66b3acfa 100644 --- a/spec/helpers/table_spec.rb +++ b/spec/helpers/table_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe 'Formatting Table' do it 'knows about colorized fitting' do t = Pry::Helpers::Table.new %w[hihi], column_count: 1 diff --git a/spec/history_spec.rb b/spec/history_spec.rb index 43bf55a2..32eadfb3 100644 --- a/spec/history_spec.rb +++ b/spec/history_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'tempfile' require 'rbconfig' diff --git a/spec/hooks_spec.rb b/spec/hooks_spec.rb index 465ed236..0b8d6f9c 100644 --- a/spec/hooks_spec.rb +++ b/spec/hooks_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Pry::Hooks do before do @hooks = Pry::Hooks.new diff --git a/spec/indent_spec.rb b/spec/indent_spec.rb index 24017441..aa48379f 100644 --- a/spec/indent_spec.rb +++ b/spec/indent_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Please keep in mind that any hash signs ("#") in the heredoc strings are # placed on purpose. Without these editors might remove the whitespace on empty # lines. diff --git a/spec/integration/bundler_spec.rb b/spec/integration/bundler_spec.rb index 7b98822b..3e8d146f 100644 --- a/spec/integration/bundler_spec.rb +++ b/spec/integration/bundler_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rbconfig' RSpec.describe 'Bundler' do diff --git a/spec/integration/cli_spec.rb b/spec/integration/cli_spec.rb index 306dcd38..0ea2a12a 100644 --- a/spec/integration/cli_spec.rb +++ b/spec/integration/cli_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rbconfig' RSpec.describe 'The bin/pry CLI' do diff --git a/spec/integration/hanami_spec.rb b/spec/integration/hanami_spec.rb index 1541a623..5fae6ef8 100644 --- a/spec/integration/hanami_spec.rb +++ b/spec/integration/hanami_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "shellwords" require 'rbconfig' diff --git a/spec/integration/readline_spec.rb b/spec/integration/readline_spec.rb index 1407ca57..aaec5d5e 100644 --- a/spec/integration/readline_spec.rb +++ b/spec/integration/readline_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # These specs ensure that Pry doesn't require readline until the first time a # REPL is started. diff --git a/spec/method/patcher_spec.rb b/spec/method/patcher_spec.rb index 24524d02..98c96dd6 100644 --- a/spec/method/patcher_spec.rb +++ b/spec/method/patcher_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Pry::Method::Patcher do # rubocop:disable Style/SingleLineMethods before do diff --git a/spec/method_spec.rb b/spec/method_spec.rb index 2d5a19f6..65ce0e96 100644 --- a/spec/method_spec.rb +++ b/spec/method_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'set' describe Pry::Method do diff --git a/spec/pager_spec.rb b/spec/pager_spec.rb index 4df0aad6..9c61cb63 100644 --- a/spec/pager_spec.rb +++ b/spec/pager_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "Pry::Pager" do describe "PageTracker" do before do diff --git a/spec/prompt_spec.rb b/spec/prompt_spec.rb index 58616cd5..04688d7e 100644 --- a/spec/prompt_spec.rb +++ b/spec/prompt_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Pry::Prompt do describe ".[]" do it "accesses prompts" do diff --git a/spec/pry_defaults_spec.rb b/spec/pry_defaults_spec.rb index 24fa54c5..816481ff 100644 --- a/spec/pry_defaults_spec.rb +++ b/spec/pry_defaults_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + _version = 1 describe "test Pry defaults" do diff --git a/spec/pry_output_spec.rb b/spec/pry_output_spec.rb index 8f905d02..3850da62 100644 --- a/spec/pry_output_spec.rb +++ b/spec/pry_output_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Pry do describe "output failsafe" do after { Pry.config.print = Pry::Config.new.print } diff --git a/spec/pry_repl_spec.rb b/spec/pry_repl_spec.rb index f407240a..946b92e8 100644 --- a/spec/pry_repl_spec.rb +++ b/spec/pry_repl_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Pry::REPL do it "should let you run commands in the middle of multiline expressions" do ReplTester.start do diff --git a/spec/pry_spec.rb b/spec/pry_spec.rb index da73c275..c320a905 100644 --- a/spec/pry_spec.rb +++ b/spec/pry_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Pry do before do @str_output = StringIO.new diff --git a/spec/pryrc_spec.rb b/spec/pryrc_spec.rb index 338f6b7e..a7b5fc2a 100644 --- a/spec/pryrc_spec.rb +++ b/spec/pryrc_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Pry do describe 'loading rc files' do before do diff --git a/spec/ring_spec.rb b/spec/ring_spec.rb index 2f023461..4c7efbb5 100644 --- a/spec/ring_spec.rb +++ b/spec/ring_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Pry::Ring do let(:ring) { described_class.new(3) } diff --git a/spec/run_command_spec.rb b/spec/run_command_spec.rb index af81d96a..8cbb8e14 100644 --- a/spec/run_command_spec.rb +++ b/spec/run_command_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "Pry.run_command" do before do o = Object.new diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b6111e27..c8315144 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + if ENV['COVERAGE'] require 'simplecov' SimpleCov.start diff --git a/spec/sticky_locals_spec.rb b/spec/sticky_locals_spec.rb index 1fa75f87..ed6b29e0 100644 --- a/spec/sticky_locals_spec.rb +++ b/spec/sticky_locals_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "Sticky locals (_file_ and friends)" do it 'locals should all exist upon initialization' do expect { pry_eval '_file_', '_dir_', '_ex_', 'pry_instance', '_' } diff --git a/spec/support/mock_pry.rb b/spec/support/mock_pry.rb index c7246111..555acee1 100644 --- a/spec/support/mock_pry.rb +++ b/spec/support/mock_pry.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + def mock_pry(*args) args.flatten! binding = args.first.is_a?(Binding) ? args.shift : binding() diff --git a/spec/support/repl_tester.rb b/spec/support/repl_tester.rb index ea0419e7..b6e7585e 100644 --- a/spec/support/repl_tester.rb +++ b/spec/support/repl_tester.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'delegate' # This is for super-high-level integration testing. diff --git a/spec/syntax_checking_spec.rb b/spec/syntax_checking_spec.rb index 9312c6a5..ec7f5b36 100644 --- a/spec/syntax_checking_spec.rb +++ b/spec/syntax_checking_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Pry do before do @str_output = StringIO.new diff --git a/spec/system_command_handler_spec.rb b/spec/system_command_handler_spec.rb index 810fd606..45893e5d 100644 --- a/spec/system_command_handler_spec.rb +++ b/spec/system_command_handler_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'stringio' RSpec.describe Pry::SystemCommandHandler do diff --git a/spec/unrescued_exceptions_spec.rb b/spec/unrescued_exceptions_spec.rb index 0874f0fa..592ac20f 100644 --- a/spec/unrescued_exceptions_spec.rb +++ b/spec/unrescued_exceptions_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe "Pry.config.unrescued_exceptions" do before do @str_output = StringIO.new diff --git a/spec/warning_spec.rb b/spec/warning_spec.rb index 18bfa219..9c94ad5d 100644 --- a/spec/warning_spec.rb +++ b/spec/warning_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + RSpec.describe Pry::Warning do describe "#warn" do it "prints message with file and line of the calling frame" do diff --git a/spec/wrapped_module_spec.rb b/spec/wrapped_module_spec.rb index f290fc76..a97affb9 100644 --- a/spec/wrapped_module_spec.rb +++ b/spec/wrapped_module_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe Pry::WrappedModule do describe "#initialize" do it "should raise an exception when a non-module is passed" do