rubocop: enable the Style/FrozenStringLiteralComment cop

This will greatly ease Pry support on Ruby 3.0 (when it's out).
This commit is contained in:
Kyrylo Silin 2019-05-03 01:33:56 +03:00
parent fc3526d139
commit 18c45d26c5
221 changed files with 446 additions and 0 deletions

View File

@ -71,3 +71,9 @@ Gemspec/RequiredRubyVersion:
Style/ModuleFunction:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: true
EnforcedStyle: always
Exclude:
- 'spec/fixtures/example_nesting.rb'

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
source 'https://rubygems.org'
gemspec

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'rake/clean'
require 'rubygems/package_task'

View File

@ -1,4 +1,6 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
$0 = 'pry'
require 'pry'

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'pry/version'
require 'pry/last_exception'
require 'pry/forwardable'

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class BasicObject < BasicObject
[:Kernel, :File, :Dir, :LoadError, :ENV, :Pry].each do |constant|

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
# A super-class for Commands that are created with a single block.
#

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
# A super-class of Commands with structure.
#

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'stringio'
class Pry

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'method_source'
class Pry

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'method_source'
class Pry

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Code
# Represents a range of lines in a code listing.

View File

@ -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

View File

@ -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.

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'pp'
require 'English'

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'delegate'
require 'shellwords'

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class NoCommandError < StandardError
def initialize(match, owner)

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'ostruct'
class Pry

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class AmendLine < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Bang < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class BangPry < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Cat < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Cat

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Cat

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Cat

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Cat

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Cd < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class ChangeInspector < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class ChangePrompt < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class ClearScreen < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class CodeCollector

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class DisablePry < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
Pry::Commands.instance_eval do
command(%r{!s/(.*?)/(.*?)}, "") do |source, dest|

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Edit < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Edit

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Edit

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Exit < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class ExitAll < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class ExitProgram < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class FindMethod < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class FixIndent < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Help < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Hist < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class ImportSet < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class JumpTo < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class ListInspectors < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Ls < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Ls < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Ls < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Ls < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Ls < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Ls < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Ls < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Ls < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Ls < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Ls < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Ls < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Ls < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Ls < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Ls < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Nesting < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Play < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class PryBacktrace < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Version < Pry::ClassCommand

View File

@ -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

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class ReloadCode < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Reset < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'stringio'
class Pry

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class SaveFile < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class ShellCommand < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class ShellMode < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class ShowDoc < Command::ShowInfo

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class ShowInfo < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class ShowInput < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class ShowSource < Command::ShowInfo

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Stat < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class SwitchTo < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class ToggleColor < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class WatchExpression < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class WatchExpression

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'method_source'
class Pry

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Command
class Wtf < Pry::ClassCommand

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'ostruct'
class Pry

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
class Config
# Attributable provides the ability to create "attribute"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
# @api private
# @since ?.?.?

View File

@ -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

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'shellwords'
class Pry

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
# @api private
# @since ?.?.?

View File

@ -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

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
module Forwardable
require 'forwardable'

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "pry/helpers/base_helpers"
require "pry/helpers/options_helpers"
require "pry/helpers/command_helpers"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
module Helpers
module BaseHelpers

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'tempfile'
class Pry

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
module Helpers
# This class contains methods useful for extracting

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
module Helpers
module OptionsHelpers

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'rbconfig'
class Pry

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Pry
module Helpers
def self.tablify_or_one_line(heading, things, config = Pry.config)

Some files were not shown because too many files have changed in this diff Show More