Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump rubocop from 1.69.2 to 1.71.1 #718

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 3, 2025

Bumps rubocop from 1.69.2 to 1.71.1.

Release notes

Sourced from rubocop's releases.

RuboCop 1.71.1

Bug fixes

  • #10081: Add the missing include RuboCop::RSpec::ExpectOffense in rubocop/rspec/support.rb. (@​d4rky-pl)
  • #13765: Fix a false negative for Lint/AmbiguousBlockAssociation with numblocks. (@​earlopain)
  • #13759: Fix a false negative for Lint/ConstantDefinitionInBlock with numblocks. (@​earlopain)
  • #13741: Register an offense for Naming/BlockForwarding and Style/ArgumentsForwarding with Ruby >= 3.4 when the block argument is referenced inside a block. This was previously disabled because of a bug in Ruby 3.3.0. (@​earlopain)
  • #13777: Fix a false negative for Layout/EmptyLineBetweenDefs with DefLikeMacros and numblocks. (@​earlopain)
  • #13769: Fix a false negative for Style/RedundantParentheses with numblocks. (@​earlopain)
  • #13780: Fix a false positive Style/AccessModifierDeclarations when using access modifier in a numblock. (@​earlopain)
  • #13775: Fix a false positive for Lint/AssignmentInCondition when assigning in numblocks. (@​earlopain)
  • #13773: Fix false positives for Layout/RedundantLineBreak when using numbered block parameter. (@​koic)
  • #13761: Fix a false positive for Style/SuperArguments when calling super in a numblock. (@​earlopain)
  • #13768: Fix a false positive for Lint/UnreachableCode with instance_eval numblock. (@​earlopain)
  • #13750: Fix false positives for Style/RedundantSelfAssignment when assigning to attribute of self. (@​koic)
  • #13739: Fix false positive for Style/HashExcept and Style/HashSlice when checking for inclusion with a range. (@​dvandersluis)
  • #13751: Fix false positive in Layout/ExtraSpacing with ForceEqualSignAlignment: true for endless methods. (@​dvandersluis)
  • #13767: Fix Style/IdenticalConditionalBranches autocorrect when condition is inside assignment. (@​dvandersluis)
  • #13764: Fix a false negative for Layout/SingleLineBlockChain with numblocks. (@​earlopain)
  • #13771: Fix wrong autocorrect for Style/SoleNestedConditional when using numblocks. (@​earlopain)

RuboCop 1.71

New features

Bug fixes

  • #13684: Fix a false positive for Style/FrozenStringLiteralComment when using the frozen string literal magic comment in Active Admin's arb files. (@​koic)
  • #13372: Add rubocop_cache to the path given by --cache-root when pruning cache. ([@​capncavedan][])
  • #13257: Fix department disable/enable comments enabling the cop for the whole file even if that file is excluded by the cop. (@​earlopain)
  • #13704: Fix false positives for Lint/OutOfRangeRegexpRef when matching with match using safe navigation. (@​koic)
  • #13720: Fix false positives for Style/BlockDelimiters when using brace blocks as conditions under EnforcedStyle: semantic. (@​koic)
  • #13688: Fix false negative on Style/RedundantLineContinuation when the continuation is preceded by an interpolated string. (@​dvandersluis)
  • #13677: Fix false negative on Style/RedundantLineContinuation when the continuation is followed by a percent array. (@​dvandersluis)
  • #13692: Fix false positive in Style/RedundantLineContinuation when the ruby code ends with a commented continuation. (@​dvandersluis)
  • #13675: Fix invalid autocorrect for Style/ArrayFirstLast when calling .[] or &.[] with 0 or -1. (@​dvandersluis)
  • #13685: Fix syntax error introduced by Lint/SafeNavigationChain when adding safe navigation to an operator call inside a hash. (@​dvandersluis)
  • #13725: Fix an incorrect autocorrect for Style/IfUnlessModifier when using omitted hash values in an assignment. ([@​elliottt][])
  • #13667: Maintain precedence in autocorrect for Style/SoleNestedConditional. ([@​tejasbubane][])
  • #13679: Fix false positive for Style/RedundantLineContinuation when calling methods with fully qualified constants. (@​earlopain)
  • #13728: Fix a RuboCop error on provided glob pattern which matches directory. ([@​viralpraxis][])
  • #13693: Fix Style/ConditionalAssignment cop error on unless without else and assign_inside_condition enforced style. ([@​viralpraxis][])
  • #13669: Fix Style/FrozenStringLiteralComment cop error on unnormalized magic comment and never enforced style. ([@​viralpraxis][])

... (truncated)

Changelog

Sourced from rubocop's changelog.

1.71.1 (2025-01-31)

Bug fixes

  • #10081: Add the missing include RuboCop::RSpec::ExpectOffense in rubocop/rspec/support.rb. ([@​d4rky-pl][])
  • #13765: Fix a false negative for Lint/AmbiguousBlockAssociation with numblocks. ([@​earlopain][])
  • #13759: Fix a false negative for Lint/ConstantDefinitionInBlock with numblocks. ([@​earlopain][])
  • #13741: Register an offense for Naming/BlockForwarding and Style/ArgumentsForwarding with Ruby >= 3.4 when the block argument is referenced inside a block. This was previously disabled because of a bug in Ruby 3.3.0. ([@​earlopain][])
  • #13777: Fix a false negative for Layout/EmptyLineBetweenDefs with DefLikeMacros and numblocks. ([@​earlopain][])
  • #13769: Fix a false negative for Style/RedundantParentheses with numblocks. ([@​earlopain][])
  • #13780: Fix a false positive Style/AccessModifierDeclarations when using access modifier in a numblock. ([@​earlopain][])
  • #13775: Fix a false positive for Lint/AssignmentInCondition when assigning in numblocks. ([@​earlopain][])
  • #13773: Fix false positives for Layout/RedundantLineBreak when using numbered block parameter. ([@​koic][])
  • #13761: Fix a false positive for Style/SuperArguments when calling super in a numblock. ([@​earlopain][])
  • #13768: Fix a false positive for Lint/UnreachableCode with instance_eval numblock. ([@​earlopain][])
  • #13750: Fix false positives for Style/RedundantSelfAssignment when assigning to attribute of self. ([@​koic][])
  • #13739: Fix false positive for Style/HashExcept and Style/HashSlice when checking for inclusion with a range. ([@​dvandersluis][])
  • #13751: Fix false positive in Layout/ExtraSpacing with ForceEqualSignAlignment: true for endless methods. ([@​dvandersluis][])
  • #13767: Fix Style/IdenticalConditionalBranches autocorrect when condition is inside assignment. ([@​dvandersluis][])
  • #13764: Fix a false negative for Layout/SingleLineBlockChain with numblocks. ([@​earlopain][])
  • #13771: Fix wrong autocorrect for Style/SoleNestedConditional when using numblocks. ([@​earlopain][])

1.71.0 (2025-01-22)

New features

Bug fixes

  • #13684: Fix a false positive for Style/FrozenStringLiteralComment when using the frozen string literal magic comment in Active Admin's arb files. ([@​koic][])
  • #13372: Add rubocop_cache to the path given by --cache-root when pruning cache. ([@​capncavedan][])
  • #13257: Fix department disable/enable comments enabling the cop for the whole file even if that file is excluded by the cop. ([@​earlopain][])
  • #13704: Fix false positives for Lint/OutOfRangeRegexpRef when matching with match using safe navigation. ([@​koic][])
  • #13720: Fix false positives for Style/BlockDelimiters when using brace blocks as conditions under EnforcedStyle: semantic. ([@​koic][])
  • #13688: Fix false negative on Style/RedundantLineContinuation when the continuation is preceded by an interpolated string. ([@​dvandersluis][])
  • #13677: Fix false negative on Style/RedundantLineContinuation when the continuation is followed by a percent array. ([@​dvandersluis][])
  • #13692: Fix false positive in Style/RedundantLineContinuation when the ruby code ends with a commented continuation. ([@​dvandersluis][])
  • #13675: Fix invalid autocorrect for Style/ArrayFirstLast when calling .[] or &.[] with 0 or -1. ([@​dvandersluis][])
  • #13685: Fix syntax error introduced by Lint/SafeNavigationChain when adding safe navigation to an operator call inside a hash. ([@​dvandersluis][])
  • #13725: Fix an incorrect autocorrect for Style/IfUnlessModifier when using omitted hash values in an assignment. ([@​elliottt][])
  • #13667: Maintain precedence in autocorrect for Style/SoleNestedConditional. ([@​tejasbubane][])
  • #13679: Fix false positive for Style/RedundantLineContinuation when calling methods with fully qualified constants. ([@​earlopain][])
  • #13728: Fix a RuboCop error on provided glob pattern which matches directory. ([@​viralpraxis][])
  • #13693: Fix Style/ConditionalAssignment cop error on unless without else and assign_inside_condition enforced style. ([@​viralpraxis][])
  • #13669: Fix Style/FrozenStringLiteralComment cop error on unnormalized magic comment and never enforced style. ([@​viralpraxis][])
  • #13696: Update Metrics/CollectionLiteralLength to only register for [] when called on Set. ([@​dvandersluis][])

Changes

... (truncated)

Commits
  • 2b94512 Cut 1.71.1
  • 6afa078 Update Changelog
  • 5160359 [Fix #13750] Fix false positives for Style/RedundantSelfAssignment
  • 3dc1694 [Fix #13751] Fix false positive in Layout/ExtraSpacing with `ForceEqualSign...
  • cce60da Merge pull request #13780 from Earlopain/access-mod-numblock
  • 2a4ee1a Fix a false positive Style/AccessModifierDeclarations when using access mod...
  • b275d5a Fix InternalAffairs/NodeTypeMultiplePredicates offenses
  • 750fc1b Add InternalAffairs/NodeTypeMultiplePredicates to look for and or or co...
  • bb4b87d Merge pull request #13778 from dvandersluis/remove-host-environment-simulatio...
  • b1a17c9 Remove HostEnvironmentSimulatorHelper
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.69.2 to 1.71.1.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](rubocop/rubocop@v1.69.2...v1.71.1)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies ruby Pull requests that update Ruby code labels Feb 3, 2025
Copy link

github-actions bot commented Feb 3, 2025

gem compare language_server-protocol 3.17.0.3 3.17.0.4

Compared versions: ["3.17.0.3", "3.17.0.4"]
  DIFFERENT date:
    3.17.0.3: 2023-01-30 00:00:00 UTC
    3.17.0.4: 2025-01-27 00:00:00 UTC
  DIFFERENT rubygems_version:
    3.17.0.3: 3.4.5
    3.17.0.4: 3.6.3
  DIFFERENT version:
    3.17.0.3: 3.17.0.3
    3.17.0.4: 3.17.0.4
  DIFFERENT files:
    3.17.0.3->3.17.0.4:
      * Changed:
            README.md +1/-1
            lib/language_server-protocol.rb +1/-1
            lib/language_server/protocol.rb +4/-4
            lib/language_server/protocol/constant.rb +35/-35
            lib/language_server/protocol/interface.rb +312/-312
            lib/language_server/protocol/interface/color_presentation.rb +1/-1
            lib/language_server/protocol/interface/completion_item.rb +3/-3
            lib/language_server/protocol/transport.rb +2/-2
            lib/language_server/protocol/transport/io.rb +2/-2
            lib/language_server/protocol/transport/io/reader.rb +4/-0
            lib/language_server/protocol/transport/io/writer.rb +4/-0
            lib/language_server/protocol/transport/stdio.rb +2/-2
            lib/language_server/protocol/version.rb +1/-1

Copy link

github-actions bot commented Feb 3, 2025

gem compare --diff language_server-protocol 3.17.0.3 3.17.0.4

Diff too large (67587 chars)

Copy link

github-actions bot commented Feb 3, 2025

gem compare parser 3.3.6.0 3.3.7.0

Compared versions: ["3.3.6.0", "3.3.7.0"]
  DIFFERENT date:
    3.3.6.0: 2024-11-05 00:00:00 UTC
    3.3.7.0: 2025-01-16 00:00:00 UTC
  DIFFERENT metadata:
    3.3.6.0: {"bug_tracker_uri" => "https://github.com/whitequark/parser/issues", "changelog_uri" => "https://github.com/whitequark/parser/blob/v3.3.6.0/CHANGELOG.md", "documentation_uri" => "https://www.rubydoc.info/gems/parser/3.3.6.0", "source_code_uri" => "https://github.com/whitequark/parser/tree/v3.3.6.0"}
    3.3.7.0: {"bug_tracker_uri" => "https://github.com/whitequark/parser/issues", "changelog_uri" => "https://github.com/whitequark/parser/blob/v3.3.7.0/CHANGELOG.md", "documentation_uri" => "https://www.rubydoc.info/gems/parser/3.3.7.0", "source_code_uri" => "https://github.com/whitequark/parser/tree/v3.3.7.0"}
  DIFFERENT version:
    3.3.6.0: 3.3.6.0
    3.3.7.0: 3.3.7.0
  DIFFERENT files:
    3.3.6.0->3.3.7.0:
      * Changed:
            lib/parser/context.rb +2/-0
            lib/parser/current.rb +1/-1
            lib/parser/ruby34.rb +8/-1
            lib/parser/runner.rb +6/-1
            lib/parser/version.rb +1/-1

Copy link

github-actions bot commented Feb 3, 2025

gem compare --diff parser 3.3.6.0 3.3.7.0

Compared versions: ["3.3.6.0", "3.3.7.0"]
  DIFFERENT files:
    3.3.6.0->3.3.7.0:
      * Changed:
        lib/parser/context.rb
                --- /tmp/d20250203-5281-3hmuly/parser-3.3.6.0/lib/parser/context.rb	2025-02-03 03:10:09.715197484 +0000
                +++ /tmp/d20250203-5281-3hmuly/parser-3.3.7.0/lib/parser/context.rb	2025-02-03 03:10:09.998197651 +0000
                @@ -26,0 +27 @@
                +      cant_return
                @@ -40,0 +42 @@
                +      @cant_return = false
        lib/parser/current.rb
                --- /tmp/d20250203-5281-3hmuly/parser-3.3.6.0/lib/parser/current.rb	2025-02-03 03:10:09.715197484 +0000
                +++ /tmp/d20250203-5281-3hmuly/parser-3.3.7.0/lib/parser/current.rb	2025-02-03 03:10:09.998197651 +0000
                @@ -114 +114 @@
                -    current_version = '3.3.6'
                +    current_version = '3.3.7'
        lib/parser/ruby34.rb
                --- /tmp/d20250203-5281-3hmuly/parser-3.3.6.0/lib/parser/ruby34.rb	2025-02-03 03:10:09.988197645 +0000
                +++ /tmp/d20250203-5281-3hmuly/parser-3.3.7.0/lib/parser/ruby34.rb	2025-02-03 03:10:10.030197669 +0000
                @@ -8790,0 +8791 @@
                +                      @context.cant_return = false
                @@ -10211,0 +10213 @@
                +                      @context.cant_return = true
                @@ -10228,0 +10231 @@
                +                      @context.cant_return = ctx.cant_return
                @@ -10235,0 +10239 @@
                +                      @context.cant_return = true
                @@ -10248,0 +10253 @@
                +                      @context.cant_return = ctx.cant_return
                @@ -10254,0 +10260 @@
                +                      @context.cant_return = true
                @@ -10269,0 +10276 @@
                +                      @context.cant_return = ctx.cant_return
                @@ -10344 +10351 @@
                -                      if @context.in_class && !@context.in_def && !(context.in_block || context.in_lambda)
                +                      if @context.cant_return && !(context.in_block || context.in_lambda)
        lib/parser/runner.rb
                --- /tmp/d20250203-5281-3hmuly/parser-3.3.6.0/lib/parser/runner.rb	2025-02-03 03:10:09.990197646 +0000
                +++ /tmp/d20250203-5281-3hmuly/parser-3.3.7.0/lib/parser/runner.rb	2025-02-03 03:10:10.031197670 +0000
                @@ -245 +245,6 @@
                -        source = File.read(filename).force_encoding(@parser.default_encoding)
                +        source = begin
                +          File.read(filename).force_encoding(@parser.default_encoding)
                +        rescue Errno::EISDIR
                +          # Will happen for a folder called `foo.rb`. Just catch this here, it's cheaper than checking every file.
                +          next
                +        end
        lib/parser/version.rb
                --- /tmp/d20250203-5281-3hmuly/parser-3.3.6.0/lib/parser/version.rb	2025-02-03 03:10:09.995197649 +0000
                +++ /tmp/d20250203-5281-3hmuly/parser-3.3.7.0/lib/parser/version.rb	2025-02-03 03:10:10.036197673 +0000
                @@ -4 +4 @@
                -  VERSION = '3.3.6.0'
                +  VERSION = '3.3.7.0'

Copy link

github-actions bot commented Feb 3, 2025

gem compare regexp_parser 2.9.3 2.10.0

Compared versions: ["2.9.3", "2.10.0"]
  DIFFERENT date:
    2.9.3: 2024-11-29 00:00:00 UTC
    2.10.0: 2024-12-25 00:00:00 UTC
  DIFFERENT version:
    2.9.3: 2.9.3
    2.10.0: 2.10.0
  DIFFERENT files:
    2.9.3->2.10.0:
      * Added:
            lib/regexp_parser/expression/methods/escape_sequence_char.rb +5/-0
            lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb +68/-0
            lib/regexp_parser/expression/methods/referenced_expressions.rb +28/-0
      * Changed:
            lib/regexp_parser/expression.rb +3/-0
            lib/regexp_parser/expression/classes/backreference.rb +1/-20
            lib/regexp_parser/expression/classes/conditional.rb +0/-14
            lib/regexp_parser/expression/classes/escape_sequence.rb +22/-94
            lib/regexp_parser/parser.rb +8/-5
            lib/regexp_parser/version.rb +1/-1

Copy link

github-actions bot commented Feb 3, 2025

gem compare --diff regexp_parser 2.9.3 2.10.0

Compared versions: ["2.9.3", "2.10.0"]
  DIFFERENT files:
    2.9.3->2.10.0:
      * Added:
        lib/regexp_parser/expression/methods/escape_sequence_char.rb
                --- /tmp/20250203-6017-831sxx	2025-02-03 03:10:31.816207348 +0000
                +++ /tmp/d20250203-6017-r43fc5/regexp_parser-2.10.0/lib/regexp_parser/expression/methods/escape_sequence_char.rb	2025-02-03 03:10:31.807207344 +0000
                @@ -0,0 +1,5 @@
                +Regexp::Expression::EscapeSequence::Base.class_eval do
                +  def char
                +    codepoint.chr('utf-8')
                +  end
                +end
        lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb
                --- /tmp/20250203-6017-250s87	2025-02-03 03:10:31.819207350 +0000
                +++ /tmp/d20250203-6017-r43fc5/regexp_parser-2.10.0/lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb	2025-02-03 03:10:31.807207344 +0000
                @@ -0,0 +1,68 @@
                +module Regexp::Expression::EscapeSequence
                +  AsciiEscape.class_eval { def codepoint; 0x1B end }
                +  Backspace.class_eval   { def codepoint; 0x8  end }
                +  Bell.class_eval        { def codepoint; 0x7  end }
                +  FormFeed.class_eval    { def codepoint; 0xC  end }
                +  Newline.class_eval     { def codepoint; 0xA  end }
                +  Return.class_eval      { def codepoint; 0xD  end }
                +  Tab.class_eval         { def codepoint; 0x9  end }
                +  VerticalTab.class_eval { def codepoint; 0xB  end }
                +
                +  Literal.class_eval     { def codepoint; text[1].ord end }
                +
                +  Octal.class_eval       { def codepoint; text[/\d+/].to_i(8) end }
                +
                +  Hex.class_eval         { def codepoint; text[/\h+/].hex end }
                +  Codepoint.class_eval   { def codepoint; text[/\h+/].hex end }
                +
                +  CodepointList.class_eval do
                +    # Maybe this should be a unique top-level expression class?
                +    def char
                +      raise NoMethodError, 'CodepointList responds only to #chars'
                +    end
                +
                +    def codepoint
                +      raise NoMethodError, 'CodepointList responds only to #codepoints'
                +    end
                +
                +    def chars
                +      codepoints.map { |cp| cp.chr('utf-8') }
                +    end
                +
                +    def codepoints
                +      text.scan(/\h+/).map(&:hex)
                +    end
                +  end
                +
                +  AbstractMetaControlSequence.class_eval do
                +    private
                +
                +    def control_sequence_to_s(control_sequence)
                +      five_lsb = control_sequence.unpack('B*').first[-5..-1]
                +      ["000#{five_lsb}"].pack('B*')
                +    end
                +
                +    def meta_char_to_codepoint(meta_char)
                +      byte_value = meta_char.ord
                +      byte_value < 128 ? byte_value + 128 : byte_value
                +    end
                +  end
                +
                +  Control.class_eval do
                +    def codepoint
                +      control_sequence_to_s(text).ord
                +    end
                +  end
                +
                +  Meta.class_eval do
                +    def codepoint
                +      meta_char_to_codepoint(text[-1])
                +    end
                +  end
                +
                +  MetaControl.class_eval do
                +    def codepoint
                +      meta_char_to_codepoint(control_sequence_to_s(text))
                +    end
                +  end
                +end
        lib/regexp_parser/expression/methods/referenced_expressions.rb
                --- /tmp/20250203-6017-htzlro	2025-02-03 03:10:31.821207351 +0000
                +++ /tmp/d20250203-6017-r43fc5/regexp_parser-2.10.0/lib/regexp_parser/expression/methods/referenced_expressions.rb	2025-02-03 03:10:31.808207344 +0000
                @@ -0,0 +1,28 @@
                +module Regexp::Expression
                +  module ReferencedExpressions
                +    attr_accessor :referenced_expressions
                +
                +    def referenced_expression
                +      referenced_expressions && referenced_expressions.first
                +    end
                +
                +    def initialize_copy(orig)
                +      exp_id = [self.class, self.starts_at]
                +
                +      # prevent infinite recursion for recursive subexp calls
                +      copied = self.class.instance_eval { @copied_ref_exps ||= {} }
                +      self.referenced_expressions =
                +        if copied[exp_id]
                +          orig.referenced_expressions
                +        else
                +          copied[exp_id] = true
                +          orig.referenced_expressions && orig.referenced_expressions.map(&:dup)
                +        end
                +      copied.clear
                +
                +      super
                +    end
                +  end
                +
                +  Base.include ReferencedExpressions
                +end
      * Changed:
        lib/regexp_parser/expression.rb
                --- /tmp/d20250203-6017-r43fc5/regexp_parser-2.9.3/lib/regexp_parser/expression.rb	2025-02-03 03:10:31.790207335 +0000
                +++ /tmp/d20250203-6017-r43fc5/regexp_parser-2.10.0/lib/regexp_parser/expression.rb	2025-02-03 03:10:31.804207342 +0000
                @@ -27,0 +28,2 @@
                +require_relative 'expression/methods/escape_sequence_char'
                +require_relative 'expression/methods/escape_sequence_codepoint'
                @@ -34,0 +37 @@
                +require_relative 'expression/methods/referenced_expressions'
        lib/regexp_parser/expression/classes/backreference.rb
                --- /tmp/d20250203-6017-r43fc5/regexp_parser-2.9.3/lib/regexp_parser/expression/classes/backreference.rb	2025-02-03 03:10:31.791207336 +0000
                +++ /tmp/d20250203-6017-r43fc5/regexp_parser-2.10.0/lib/regexp_parser/expression/classes/backreference.rb	2025-02-03 03:10:31.805207343 +0000
                @@ -3,20 +3 @@
                -    class Base < Regexp::Expression::Base
                -      attr_accessor :referenced_expression
                -
                -      def initialize_copy(orig)
                -        exp_id = [self.class, self.starts_at]
                -
                -        # prevent infinite recursion for recursive subexp calls
                -        copied = @@copied ||= {}
                -        self.referenced_expression =
                -          if copied[exp_id]
                -            orig.referenced_expression
                -          else
                -            copied[exp_id] = true
                -            orig.referenced_expression.dup
                -          end
                -        copied.clear
                -
                -        super
                -      end
                -    end
                +    class Base < Regexp::Expression::Base; end
        lib/regexp_parser/expression/classes/conditional.rb
                --- /tmp/d20250203-6017-r43fc5/regexp_parser-2.9.3/lib/regexp_parser/expression/classes/conditional.rb	2025-02-03 03:10:31.792207336 +0000
                +++ /tmp/d20250203-6017-r43fc5/regexp_parser-2.10.0/lib/regexp_parser/expression/classes/conditional.rb	2025-02-03 03:10:31.805207343 +0000
                @@ -10,2 +9,0 @@
                -      attr_accessor :referenced_expression
                -
                @@ -18,5 +15,0 @@
                -
                -      def initialize_copy(orig)
                -        self.referenced_expression = orig.referenced_expression.dup
                -        super
                -      end
                @@ -28,2 +20,0 @@
                -      attr_accessor :referenced_expression
                -
                @@ -56,5 +46,0 @@
                -      end
                -
                -      def initialize_copy(orig)
                -        self.referenced_expression = orig.referenced_expression.dup
                -        super
        lib/regexp_parser/expression/classes/escape_sequence.rb
                --- /tmp/d20250203-6017-r43fc5/regexp_parser-2.9.3/lib/regexp_parser/expression/classes/escape_sequence.rb	2025-02-03 03:10:31.792207336 +0000
                +++ /tmp/d20250203-6017-r43fc5/regexp_parser-2.10.0/lib/regexp_parser/expression/classes/escape_sequence.rb	2025-02-03 03:10:31.806207343 +0000
                @@ -3,4 +3 @@
                -    class Base < Regexp::Expression::Base
                -      def codepoint
                -        char.ord
                -      end
                +    Base        = Class.new(Regexp::Expression::Base)
                @@ -8,90 +5,21 @@
                -      if ''.respond_to?(:undump)
                -        def char
                -          %("#{text}").undump
                -        end
                -      else
                -        # poor man's unescape without using eval
                -        require 'yaml'
                -        def char
                -          YAML.load(%Q(---\n"#{text}"\n))
                -        end
                -      end
                -    end
                -
                -    class Literal < EscapeSequence::Base
                -      def char
                -        text[1..-1]
                -      end
                -    end
                -
                -    class AsciiEscape   < EscapeSequence::Base; end
                -    class Backspace     < EscapeSequence::Base; end
                -    class Bell          < EscapeSequence::Base; end
                -    class FormFeed      < EscapeSequence::Base; end
                -    class Newline       < EscapeSequence::Base; end
                -    class Return        < EscapeSequence::Base; end
                -    class Tab           < EscapeSequence::Base; end
                -    class VerticalTab   < EscapeSequence::Base; end
                -
                -    class Hex           < EscapeSequence::Base; end
                -    class Codepoint     < EscapeSequence::Base; end
                -
                -    class CodepointList < EscapeSequence::Base
                -      def char
                -        raise NoMethodError, 'CodepointList responds only to #chars'
                -      end
                -
                -      def codepoint
                -        raise NoMethodError, 'CodepointList responds only to #codepoints'
                -      end
                -
                -      def chars
                -        codepoints.map { |cp| cp.chr('utf-8') }
                -      end
                -
                -      def codepoints
                -        text.scan(/\h+/).map(&:hex)
                -      end
                -    end
                -
                -    class Octal < EscapeSequence::Base
                -      def char
                -        text[1..-1].to_i(8).chr('utf-8')
                -      end
                -    end
                -
                -    class AbstractMetaControlSequence < EscapeSequence::Base
                -      def char
                -        codepoint.chr('utf-8')
                -      end
                -
                -      private
                -
                -      def control_sequence_to_s(control_sequence)
                -        five_lsb = control_sequence.unpack('B*').first[-5..-1]
                -        ["000#{five_lsb}"].pack('B*')
                -      end
                -
                -      def meta_char_to_codepoint(meta_char)
                -        byte_value = meta_char.ord
                -        byte_value < 128 ? byte_value + 128 : byte_value
                -      end
                -    end
                -
                -    class Control < AbstractMetaControlSequence
                -      def codepoint
                -        control_sequence_to_s(text).ord
                -      end
                -    end
                -
                -    class Meta < AbstractMetaControlSequence
                -      def codepoint
                -        meta_char_to_codepoint(text[-1])
                -      end
                -    end
                -
                -    class MetaControl < AbstractMetaControlSequence
                -      def codepoint
                -        meta_char_to_codepoint(control_sequence_to_s(text))
                -      end
                -    end
                +    AsciiEscape = Class.new(Base) # \e
                +    Backspace   = Class.new(Base) # \b
                +    Bell        = Class.new(Base) # \a
                +    FormFeed    = Class.new(Base) # \f
                +    Newline     = Class.new(Base) # \n
                +    Return      = Class.new(Base) # \r
                +    Tab         = Class.new(Base) # \t
                +    VerticalTab = Class.new(Base) # \v
                +
                +    Literal     = Class.new(Base) # e.g. \j, \@, \😀 (ineffectual escapes)
                +
                +    Octal       = Class.new(Base) # e.g. \012
                +    Hex         = Class.new(Base) # e.g. \x0A
                +    Codepoint   = Class.new(Base) # e.g. \u000A
                +
                +    CodepointList = Class.new(Base) # e.g. \u{A B}
                +
                +    AbstractMetaControlSequence = Class.new(Base)
                +    Control                     = Class.new(AbstractMetaControlSequence) # e.g. \cB
                +    Meta                        = Class.new(AbstractMetaControlSequence) # e.g. \M-Z
                +    MetaControl                 = Class.new(AbstractMetaControlSequence) # e.g. \M-\cX
        lib/regexp_parser/parser.rb
                --- /tmp/d20250203-6017-r43fc5/regexp_parser-2.9.3/lib/regexp_parser/parser.rb	2025-02-03 03:10:31.796207338 +0000
                +++ /tmp/d20250203-6017-r43fc5/regexp_parser-2.10.0/lib/regexp_parser/parser.rb	2025-02-03 03:10:31.809207345 +0000
                @@ -583 +583 @@
                -    targets = { 0 => root }
                +    targets = { 0 => [root] }
                @@ -586,2 +586,5 @@
                -      exp.is_a?(Group::Capture) && targets[exp.identifier] = exp
                -      referrers << exp if exp.referential?
                +      if exp.referential?
                +        referrers << exp
                +      elsif exp.is_a?(Group::Capture)
                +        (targets[exp.identifier] ||= []) << exp
                +      end
                @@ -589 +592 @@
                -    # assign reference expression to referring expressions
                +    # assign referenced expressions to referring expressions
                @@ -592 +595 @@
                -      exp.referenced_expression = targets[exp.reference] ||
                +      exp.referenced_expressions = targets[exp.reference] ||
        lib/regexp_parser/version.rb
                --- /tmp/d20250203-6017-r43fc5/regexp_parser-2.9.3/lib/regexp_parser/version.rb	2025-02-03 03:10:31.803207342 +0000
                +++ /tmp/d20250203-6017-r43fc5/regexp_parser-2.10.0/lib/regexp_parser/version.rb	2025-02-03 03:10:31.816207348 +0000
                @@ -3 +3 @@
                -    VERSION = '2.9.3'
                +    VERSION = '2.10.0'

Copy link

github-actions bot commented Feb 3, 2025

gem compare rubocop 1.69.2 1.71.1

Compared versions: ["1.69.2", "1.71.1"]
  DIFFERENT date:
    1.69.2: 2024-12-12 00:00:00 UTC
    1.71.1: 2025-01-31 00:00:00 UTC
  DIFFERENT metadata:
    1.69.2: {"homepage_uri" => "https://rubocop.org/", "changelog_uri" => "https://github.com/rubocop/rubocop/releases/tag/v1.69.2", "source_code_uri" => "https://github.com/rubocop/rubocop/", "documentation_uri" => "https://docs.rubocop.org/rubocop/1.69/", "bug_tracker_uri" => "https://github.com/rubocop/rubocop/issues", "rubygems_mfa_required" => "true"}
    1.71.1: {"homepage_uri" => "https://rubocop.org/", "changelog_uri" => "https://github.com/rubocop/rubocop/releases/tag/v1.71.1", "source_code_uri" => "https://github.com/rubocop/rubocop/", "documentation_uri" => "https://docs.rubocop.org/rubocop/1.71/", "bug_tracker_uri" => "https://github.com/rubocop/rubocop/issues", "rubygems_mfa_required" => "true"}
  DIFFERENT rubygems_version:
    1.69.2: 3.4.22
    1.71.1: 3.6.2
  DIFFERENT version:
    1.69.2: 1.69.2
    1.71.1: 1.71.1
  DIFFERENT files:
    1.69.2->1.71.1:
      * Deleted:
            lib/rubocop/rspec/host_environment_simulation_helper.rb
      * Added:
            lib/rubocop/cop/internal_affairs/cop_enabled.rb +85/-0
            lib/rubocop/cop/internal_affairs/node_pattern_groups.rb +229/-0
            lib/rubocop/cop/internal_affairs/node_pattern_groups/ast_processor.rb +63/-0
            lib/rubocop/cop/internal_affairs/node_pattern_groups/ast_walker.rb +131/-0
            lib/rubocop/cop/internal_affairs/node_type_multiple_predicates.rb +126/-0
            lib/rubocop/cop/internal_affairs/on_send_without_on_csend.rb +90/-0
            lib/rubocop/cop/lint/array_literal_in_regexp.rb +119/-0
            lib/rubocop/cop/lint/constant_reassignment.rb +148/-0
            lib/rubocop/cop/lint/shared_mutable_default.rb +65/-0
            lib/rubocop/cop/mixin/hash_subset.rb +188/-0
            lib/rubocop/cop/style/hash_slice.rb +80/-0
            lib/rubocop/cop/style/it_assignment.rb +36/-0
            lib/rubocop/lsp/diagnostic.rb +189/-0
            lib/rubocop/lsp/stdin_runner.rb +83/-0
            lib/ruby_lsp/rubocop/addon.rb +78/-0
            lib/ruby_lsp/rubocop/wraps_built_in_lsp_runtime.rb +50/-0
      * Changed:
            LICENSE.txt +1/-1
            README.md +2/-2
            config/default.yml +36/-2
            lib/rubocop.rb +6/-0
            lib/rubocop/cli/command/execute_runner.rb +3/-3
            lib/rubocop/cli/command/show_cops.rb +24/-2
            lib/rubocop/comment_config.rb +1/-1
            lib/rubocop/config.rb +13/-4
            lib/rubocop/config_loader.rb +4/-0
            lib/rubocop/config_loader_resolver.rb +14/-3
            lib/rubocop/config_validator.rb +18/-8
            lib/rubocop/cop/autocorrect_logic.rb +1/-1
            lib/rubocop/cop/base.rb +6/-0
            lib/rubocop/cop/bundler/duplicated_gem.rb +1/-1
            lib/rubocop/cop/bundler/gem_comment.rb +1/-1
            lib/rubocop/cop/internal_affairs.rb +4/-0
            lib/rubocop/cop/internal_affairs/location_expression.rb +2/-1
            lib/rubocop/cop/internal_affairs/node_first_or_last_argument.rb +3/-2
            lib/rubocop/cop/internal_affairs/node_matcher_directive.rb +1/-1
            lib/rubocop/cop/internal_affairs/node_type_predicate.rb +4/-3
            lib/rubocop/cop/internal_affairs/redundant_source_range.rb +3/-1
            lib/rubocop/cop/internal_affairs/single_line_comparison.rb +5/-4
            lib/rubocop/cop/layout/access_modifier_indentation.rb +1/-1
            lib/rubocop/cop/layout/argument_alignment.rb +2/-8
            lib/rubocop/cop/layout/block_alignment.rb +1/-1
            lib/rubocop/cop/layout/class_structure.rb +9/-9
            lib/rubocop/cop/layout/dot_position.rb +1/-1
            lib/rubocop/cop/layout/empty_line_between_defs.rb +7/-5
            lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb +1/-0
            lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb +1/-1
            lib/rubocop/cop/layout/end_alignment.rb +1/-1
            lib/rubocop/cop/layout/extra_spacing.rb +1/-1
            lib/rubocop/cop/layout/first_argument_indentation.rb +3/-8
            lib/rubocop/cop/layout/first_array_element_indentation.rb +2/-7
            lib/rubocop/cop/layout/first_hash_element_indentation.rb +2/-7
            lib/rubocop/cop/layout/first_hash_element_line_break.rb +1/-1
            lib/rubocop/cop/layout/first_parameter_indentation.rb +2/-2
            lib/rubocop/cop/layout/hash_alignment.rb +6/-4
            lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb +1/-0
            lib/rubocop/cop/layout/line_continuation_spacing.rb +7/-1
            lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb +2/-2
            lib/rubocop/cop/layout/line_length.rb +1/-0
            lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb +1/-1
            lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb +25/-0
            lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb +1/-0
            lib/rubocop/cop/layout/multiline_method_call_indentation.rb +2/-2
            lib/rubocop/cop/layout/redundant_line_break.rb +7/-6
            lib/rubocop/cop/layout/rescue_ensure_alignment.rb +1/-1
            lib/rubocop/cop/layout/single_line_block_chain.rb +1/-1
            lib/rubocop/cop/layout/space_after_colon.rb +2/-2
            lib/rubocop/cop/layout/space_after_comma.rb +1/-1
            lib/rubocop/cop/layout/space_after_method_name.rb +1/-1
            lib/rubocop/cop/layout/space_after_semicolon.rb +1/-1
            lib/rubocop/cop/layout/space_around_keyword.rb +1/-0
            lib/rubocop/cop/layout/space_around_operators.rb +3/-3
            lib/rubocop/cop/layout/space_before_comma.rb +1/-1
            lib/rubocop/cop/layout/space_before_semicolon.rb +1/-1
            lib/rubocop/cop/layout/trailing_whitespace.rb +5/-3
            lib/rubocop/cop/lint/ambiguous_block_association.rb +1/-1
            lib/rubocop/cop/lint/assignment_in_condition.rb +1/-3
            lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb +1/-1
            lib/rubocop/cop/lint/constant_definition_in_block.rb +3/-3
            lib/rubocop/cop/lint/debugger.rb +1/-1
            lib/rubocop/cop/lint/duplicate_match_pattern.rb +1/-1
            lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb +1/-1
            lib/rubocop/cop/lint/duplicate_set_element.rb +20/-7
            lib/rubocop/cop/lint/float_comparison.rb +5/-2
            lib/rubocop/cop/lint/float_out_of_range.rb +1/-1
            lib/rubocop/cop/lint/format_parameter_mismatch.rb +1/-1
            lib/rubocop/cop/lint/implicit_string_concatenation.rb +1/-1
            lib/rubocop/cop/lint/literal_in_interpolation.rb +24/-6
            lib/rubocop/cop/lint/missing_super.rb +2/-2
            lib/rubocop/cop/lint/mixed_case_range.rb +1/-1
            lib/rubocop/cop/lint/mixed_regexp_capture_types.rb +1/-1
            lib/rubocop/cop/lint/nested_method_definition.rb +8/-4
            lib/rubocop/cop/lint/next_without_accumulator.rb +1/-1
            lib/rubocop/cop/lint/non_atomic_file_operation.rb +4/-3
            lib/rubocop/cop/lint/non_local_exit_from_iterator.rb +1/-1
            lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb +18/-31
            lib/rubocop/cop/lint/out_of_range_regexp_ref.rb +2/-1
            lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb +1/-5
            lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb +1/-1
            lib/rubocop/cop/lint/redundant_string_coercion.rb +2/-2
            lib/rubocop/cop/lint/rescue_exception.rb +1/-1
            lib/rubocop/cop/lint/safe_navigation_chain.rb +8/-1
            lib/rubocop/cop/lint/suppressed_exception.rb +1/-1
            lib/rubocop/cop/lint/symbol_conversion.rb +1/-1
            lib/rubocop/cop/lint/syntax.rb +4/-1
            lib/rubocop/cop/lint/unescaped_bracket_in_regexp.rb +1/-4
            lib/rubocop/cop/lint/unexpected_block_arity.rb +1/-1
            lib/rubocop/cop/lint/unreachable_code.rb +1/-1
            lib/rubocop/cop/lint/unreachable_loop.rb +1/-1
            lib/rubocop/cop/lint/useless_access_modifier.rb +4/-4
            lib/rubocop/cop/lint/useless_assignment.rb +1/-1
            lib/rubocop/cop/lint/useless_method_definition.rb +1/-1
            lib/rubocop/cop/lint/useless_numeric_operation.rb +2/-1
            lib/rubocop/cop/lint/useless_ruby2_keywords.rb +2/-2
            lib/rubocop/cop/lint/void.rb +4/-3
            lib/rubocop/cop/metrics/block_nesting.rb +1/-1
            lib/rubocop/cop/metrics/collection_literal_length.rb +7/-0
            lib/rubocop/cop/metrics/cyclomatic_complexity.rb +1/-1
            lib/rubocop/cop/metrics/method_length.rb +8/-1
            lib/rubocop/cop/metrics/module_length.rb +1/-1
            lib/rubocop/cop/metrics/perceived_complexity.rb +1/-1
            lib/rubocop/cop/mixin/check_line_breakable.rb +11/-11
            lib/rubocop/cop/mixin/comments_help.rb +3/-1
            lib/rubocop/cop/mixin/dig_help.rb +1/-1
            lib/rubocop/cop/mixin/frozen_string_literal.rb +1/-1
            lib/rubocop/cop/mixin/hash_shorthand_syntax.rb +4/-4
            lib/rubocop/cop/mixin/method_complexity.rb +1/-1
            lib/rubocop/cop/mixin/preceding_following_alignment.rb +48/-24
            lib/rubocop/cop/mixin/space_before_punctuation.rb +1/-1
            lib/rubocop/cop/mixin/statement_modifier.rb +8/-3
            lib/rubocop/cop/mixin/string_help.rb +1/-1
            lib/rubocop/cop/mixin/string_literals_help.rb +1/-1
            lib/rubocop/cop/mixin/trailing_comma.rb +3/-3
            lib/rubocop/cop/naming/block_forwarding.rb +19/-15
            lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb +3/-3
            lib/rubocop/cop/security/compound_hash.rb +1/-0
            lib/rubocop/cop/style/access_modifier_declarations.rb +34/-5
            lib/rubocop/cop/style/and_or.rb +1/-1
            lib/rubocop/cop/style/arguments_forwarding.rb +39/-23
            lib/rubocop/cop/style/array_first_last.rb +18/-2
            lib/rubocop/cop/style/block_delimiters.rb +7/-20
            lib/rubocop/cop/style/class_and_module_children.rb +6/-3
            lib/rubocop/cop/style/collection_methods.rb +1/-1
            lib/rubocop/cop/style/combinable_defined.rb +1/-1
            lib/rubocop/cop/style/combinable_loops.rb +2/-2
            lib/rubocop/cop/style/concat_array_literals.rb +1/-1
            lib/rubocop/cop/style/conditional_assignment.rb +6/-4
            lib/rubocop/cop/style/documentation.rb +1/-1
            lib/rubocop/cop/style/double_negation.rb +3/-3
            lib/rubocop/cop/style/each_for_simple_loop.rb +4/-7
            lib/rubocop/cop/style/empty_else.rb +4/-2
            lib/rubocop/cop/style/empty_literal.rb +1/-1
            lib/rubocop/cop/style/empty_method.rb +1/-1
            lib/rubocop/cop/style/eval_with_location.rb +1/-1
            lib/rubocop/cop/style/exact_regexp_match.rb +3/-10
            lib/rubocop/cop/style/explicit_block_argument.rb +1/-1
            lib/rubocop/cop/style/exponential_notation.rb +1/-1
            lib/rubocop/cop/style/fetch_env_var.rb +1/-1
            lib/rubocop/cop/style/float_division.rb +8/-4
            lib/rubocop/cop/style/frozen_string_literal_comment.rb +1/-1
            lib/rubocop/cop/style/hash_each_methods.rb +3/-6
            lib/rubocop/cop/style/hash_except.rb +24/-148
            lib/rubocop/cop/style/hash_syntax.rb +6/-3
            lib/rubocop/cop/style/identical_conditional_branches.rb +22/-3
            lib/rubocop/cop/style/if_unless_modifier.rb +3/-3
            lib/rubocop/cop/style/if_with_boolean_literal_branches.rb +1/-1
            lib/rubocop/cop/style/if_with_semicolon.rb +2/-2
            lib/rubocop/cop/style/infinite_loop.rb +1/-1
            lib/rubocop/cop/style/inverse_methods.rb +6/-6
            lib/rubocop/cop/style/keyword_parameters_order.rb +1/-1
            lib/rubocop/cop/style/map_into_array.rb +1/-1
            lib/rubocop/cop/style/map_to_hash.rb +1/-1
            lib/rubocop/cop/style/map_to_set.rb +3/-2
            lib/rubocop/cop/style/method_call_with_args_parentheses.rb +2/-0
            lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb +19/-12
            lib/rubocop/cop/style/method_call_without_args_parentheses.rb +2/-1
            lib/rubocop/cop/style/method_called_on_do_end_block.rb +2/-4
            lib/rubocop/cop/style/method_def_parentheses.rb +1/-1
            lib/rubocop/cop/style/missing_else.rb +2/-0
            lib/rubocop/cop/style/multiline_block_chain.rb +1/-1
            lib/rubocop/cop/style/multiple_comparison.rb +26/-20
            lib/rubocop/cop/style/mutable_constant.rb +3/-3
            lib/rubocop/cop/style/negated_if_else_condition.rb +1/-1
            lib/rubocop/cop/style/nested_parenthesized_calls.rb +1/-1
            lib/rubocop/cop/style/object_then.rb +13/-15
            lib/rubocop/cop/style/open_struct_use.rb +5/-5
            lib/rubocop/cop/style/parallel_assignment.rb +1/-5
            lib/rubocop/cop/style/parentheses_around_condition.rb +2/-2
            lib/rubocop/cop/style/percent_literal_delimiters.rb +1/-1
            lib/rubocop/cop/style/proc.rb +1/-2
            lib/rubocop/cop/style/quoted_symbols.rb +1/-1
            lib/rubocop/cop/style/raise_args.rb +6/-4
            lib/rubocop/cop/style/random_with_offset.rb +3/-3
            lib/rubocop/cop/style/redundant_begin.rb +1/-1
            lib/rubocop/cop/style/redundant_condition.rb +2/-2
            lib/rubocop/cop/style/redundant_current_directory_in_path.rb +2/-1
            lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb +6/-10
            lib/rubocop/cop/style/redundant_each.rb +1/-1
            lib/rubocop/cop/style/redundant_exception.rb +2/-2
            lib/rubocop/cop/style/redundant_freeze.rb +2/-2
            lib/rubocop/cop/style/redundant_initialize.rb +12/-3
            lib/rubocop/cop/style/redundant_line_continuation.rb +34/-13
            lib/rubocop/cop/style/redundant_parentheses.rb +10/-10
            lib/rubocop/cop/style/redundant_regexp_argument.rb +3/-0
            lib/rubocop/cop/style/redundant_regexp_character_class.rb +1/-1
            lib/rubocop/cop/style/redundant_regexp_escape.rb +1/-1
            lib/rubocop/cop/style/redundant_self_assignment.rb +14/-28
            lib/rubocop/cop/style/redundant_sort.rb +2/-2
            lib/rubocop/cop/style/redundant_string_escape.rb +2/-2
            lib/rubocop/cop/style/return_nil.rb +1/-1
            lib/rubocop/cop/style/safe_navigation.rb +2/-2
            lib/rubocop/cop/style/semicolon.rb +1/-1
            lib/rubocop/cop/style/send_with_literal_method_name.rb +2/-1
            lib/rubocop/cop/style/single_line_block_params.rb +1/-1
            lib/rubocop/cop/style/single_line_do_end_block.rb +1/-2
            lib/rubocop/cop/style/single_line_methods.rb +3/-4
            lib/rubocop/cop/style/slicing_with_range.rb +40/-11
            lib/rubocop/cop/style/sole_nested_conditional.rb +2/-2
            lib/rubocop/cop/style/string_concatenation.rb +1/-1
            lib/rubocop/cop/style/string_literals.rb +1/-1
            lib/rubocop/cop/style/string_methods.rb +1/-1
            lib/rubocop/cop/style/super_arguments.rb +65/-17
            lib/rubocop/cop/style/ternary_parentheses.rb +1/-1
            lib/rubocop/cop/style/top_level_method_definition.rb +1/-1
            lib/rubocop/cop/style/trailing_comma_in_arguments.rb +4/-1
            lib/rubocop/cop/style/yoda_condition.rb +8/-4
            lib/rubocop/cop/style/yoda_expression.rb +2/-1
            lib/rubocop/cop/util.rb +11/-4
            lib/rubocop/cop/variable_force/variable.rb +1/-1
            lib/rubocop/cop/variable_force/variable_table.rb +3/-3
            lib/rubocop/cops_documentation_generator.rb +13/-13
            lib/rubocop/directive_comment.rb +9/-8
            lib/rubocop/formatter/formatter_set.rb +1/-1
            lib/rubocop/lsp/logger.rb +2/-2
            lib/rubocop/lsp/routes.rb +7/-23
            lib/rubocop/lsp/runtime.rb +15/-49
            lib/rubocop/options.rb +2/-1
            lib/rubocop/path_util.rb +11/-8
            lib/rubocop/result_cache.rb +13/-13
            lib/rubocop/rspec/expect_offense.rb +6/-2
            lib/rubocop/rspec/shared_contexts.rb +4/-1
            lib/rubocop/rspec/support.rb +1/-2
            lib/rubocop/runner.rb +5/-6
            lib/rubocop/target_finder.rb +1/-0
            lib/rubocop/target_ruby.rb +15/-0
            lib/rubocop/version.rb +1/-1
  DIFFERENT extra_rdoc_files:
    1.69.2->1.71.1:
      * Changed:
            LICENSE.txt +1/-1
            README.md +2/-2
  DIFFERENT runtime dependencies:
    1.69.2->1.71.1:
      * Updated:
            rubocop-ast from: [">= 1.36.2", "< 2.0"] to: [">= 1.38.0", "< 2.0"]

Copy link

github-actions bot commented Feb 3, 2025

gem compare --diff rubocop 1.69.2 1.71.1

Diff too large (330182 chars)

Copy link

github-actions bot commented Feb 3, 2025

gem compare rubocop-ast 1.37.0 1.38.0

Compared versions: ["1.37.0", "1.38.0"]
  DIFFERENT date:
    1.37.0: 2024-12-13 00:00:00 UTC
    1.38.0: 2025-01-27 00:00:00 UTC
  DIFFERENT version:
    1.37.0: 1.37.0
    1.38.0: 1.38.0
  DIFFERENT files:
    1.37.0->1.38.0:
      * Changed:
            lib/rubocop/ast/node.rb +26/-18
            lib/rubocop/ast/node/args_node.rb +1/-1
            lib/rubocop/ast/node/array_node.rb +3/-3
            lib/rubocop/ast/node/if_node.rb +2/-2
            lib/rubocop/ast/node/mixin/descendence.rb +3/-3
            lib/rubocop/ast/node/mixin/method_dispatch_node.rb +3/-3
            lib/rubocop/ast/node/mixin/predicate_operator_node.rb +7/-2
            lib/rubocop/ast/node/str_node.rb +4/-4
            lib/rubocop/ast/node_pattern/node.rb +7/-1
            lib/rubocop/ast/processed_source.rb +28/-8
            lib/rubocop/ast/token.rb +2/-1
            lib/rubocop/ast/version.rb +1/-1

Copy link

github-actions bot commented Feb 3, 2025

gem compare --diff rubocop-ast 1.37.0 1.38.0

Compared versions: ["1.37.0", "1.38.0"]
  DIFFERENT files:
    1.37.0->1.38.0:
      * Changed:
        lib/rubocop/ast/node.rb
                --- /tmp/d20250203-13880-f1ksez/rubocop-ast-1.37.0/lib/rubocop/ast/node.rb	2025-02-03 03:11:24.345226145 +0000
                +++ /tmp/d20250203-13880-f1ksez/rubocop-ast-1.38.0/lib/rubocop/ast/node.rb	2025-02-03 03:11:24.359226150 +0000
                @@ -79,3 +78,0 @@
                -      # @api private
                -      ARGUMENT_TYPES = %i[arg optarg restarg kwarg kwoptarg kwrestarg
                -                          blockarg forward_arg shadowarg].to_set.freeze
                @@ -101 +98 @@
                -        shardowarg: :argument,
                +        shadowarg: :argument,
                @@ -115 +112,4 @@
                -        csend: :call
                +        csend: :call,
                +
                +        block: :any_block,
                +        numblock: :any_block
                @@ -346 +346 @@
                -        {(send $_ ...) ({block numblock} (call $_ ...) ...)}
                +        {(send $_ ...) (any_block (call $_ ...) ...)}
                @@ -530,0 +531,4 @@
                +      def any_block_type?
                +        GROUP_FOR_TYPE[type] == :any_block
                +      end
                +
                @@ -536,0 +541,8 @@
                +      # Shortcut to safely check if a location is present
                +      # @return [Boolean]
                +      def loc?(which_loc)
                +        return false unless loc.respond_to?(which_loc)
                +
                +        !loc.public_send(which_loc).nil?
                +      end
                +
                @@ -540,4 +552 @@
                -        return false unless loc.respond_to?(which_loc)
                -
                -        location = loc.public_send(which_loc)
                -        return false unless location
                +        return false unless loc?(which_loc)
                @@ -545 +554 @@
                -        location.is?(str)
                +        loc.public_send(which_loc).is?(str)
                @@ -561 +570 @@
                -      def_node_matcher :lambda?, '({block numblock} (send nil? :lambda) ...)'
                +      def_node_matcher :lambda?, '(any_block (send nil? :lambda) ...)'
                @@ -574 +583 @@
                -          ({block numblock} {
                +          (any_block {
                @@ -584 +593 @@
                -        ({block numblock} (send #global_const?(:Struct) :new ...) _ $_)
                +        (any_block (send #global_const?(:Struct) :new ...) _ $_)
                @@ -591 +600 @@
                -         ({block numblock} (send #global_const?({:Struct :Class}) :new ...) _ $_)}
                +         (any_block (send #global_const?({:Struct :Class}) :new ...) _ $_)}
                @@ -597 +606 @@
                -         ({block numblock} (send #global_const?(:Module) :new ...) _ $_)}
                +         (any_block (send #global_const?(:Module) :new ...) _ $_)}
                @@ -660,2 +669 @@
                -          yield current_node if types.empty? ||
                -                                types.include?(current_node.type)
                +          yield current_node if types.empty? || current_node.type?(*types)
        lib/rubocop/ast/node/args_node.rb
                --- /tmp/d20250203-13880-f1ksez/rubocop-ast-1.37.0/lib/rubocop/ast/node/args_node.rb	2025-02-03 03:11:24.346226145 +0000
                +++ /tmp/d20250203-13880-f1ksez/rubocop-ast-1.38.0/lib/rubocop/ast/node/args_node.rb	2025-02-03 03:11:24.360226150 +0000
                @@ -35 +35 @@
                -        each_descendant(*ARGUMENT_TYPES).to_a.freeze
                +        each_descendant(:argument).to_a.freeze
        lib/rubocop/ast/node/array_node.rb
                --- /tmp/d20250203-13880-f1ksez/rubocop-ast-1.37.0/lib/rubocop/ast/node/array_node.rb	2025-02-03 03:11:24.346226145 +0000
                +++ /tmp/d20250203-13880-f1ksez/rubocop-ast-1.38.0/lib/rubocop/ast/node/array_node.rb	2025-02-03 03:11:24.360226150 +0000
                @@ -10,2 +10,2 @@
                -        string: /^%[wW]/,
                -        symbol: /^%[iI]/
                +        string: /\A%[wW]/,
                +        symbol: /\A%[iI]/
                @@ -53 +53 @@
                -          loc.begin && loc.begin.source =~ PERCENT_LITERAL_TYPES[type]
                +          loc.begin&.source&.match?(PERCENT_LITERAL_TYPES.fetch(type))
        lib/rubocop/ast/node/if_node.rb
                --- /tmp/d20250203-13880-f1ksez/rubocop-ast-1.37.0/lib/rubocop/ast/node/if_node.rb	2025-02-03 03:11:24.348226146 +0000
                +++ /tmp/d20250203-13880-f1ksez/rubocop-ast-1.38.0/lib/rubocop/ast/node/if_node.rb	2025-02-03 03:11:24.362226151 +0000
                @@ -50 +50 @@
                -        loc.respond_to?(:else) && loc.else
                +        loc?(:else)
                @@ -57 +57 @@
                -        loc.respond_to?(:question)
                +        loc?(:question)
        lib/rubocop/ast/node/mixin/descendence.rb
                --- /tmp/d20250203-13880-f1ksez/rubocop-ast-1.37.0/lib/rubocop/ast/node/mixin/descendence.rb	2025-02-03 03:11:24.350226146 +0000
                +++ /tmp/d20250203-13880-f1ksez/rubocop-ast-1.38.0/lib/rubocop/ast/node/mixin/descendence.rb	2025-02-03 03:11:24.364226151 +0000
                @@ -28 +28 @@
                -          yield child if types.empty? || types.include?(child.type)
                +          yield child if types.empty? || child.type?(*types)
                @@ -98 +98 @@
                -        yield self if types.empty? || types.include?(type)
                +        yield self if types.empty? || type?(*types)
                @@ -111 +111 @@
                -          yield child if types.empty? || types.include?(child.type)
                +          yield child if types.empty? || child.type?(*types)
        lib/rubocop/ast/node/mixin/method_dispatch_node.rb
                --- /tmp/d20250203-13880-f1ksez/rubocop-ast-1.37.0/lib/rubocop/ast/node/mixin/method_dispatch_node.rb	2025-02-03 03:11:24.350226146 +0000
                +++ /tmp/d20250203-13880-f1ksez/rubocop-ast-1.38.0/lib/rubocop/ast/node/mixin/method_dispatch_node.rb	2025-02-03 03:11:24.364226151 +0000
                @@ -108 +108 @@
                -        loc.respond_to?(:operator) && loc.operator
                +        loc?(:operator)
                @@ -168 +168 @@
                -        (parent&.block_type? || parent&.numblock_type?) && eql?(parent.send_node)
                +        parent&.any_block_type? && eql?(parent.send_node)
                @@ -263 +263 @@
                -                kwbegin begin block numblock
                +                kwbegin begin any_block
        lib/rubocop/ast/node/mixin/predicate_operator_node.rb
                --- /tmp/d20250203-13880-f1ksez/rubocop-ast-1.37.0/lib/rubocop/ast/node/mixin/predicate_operator_node.rb	2025-02-03 03:11:24.351226147 +0000
                +++ /tmp/d20250203-13880-f1ksez/rubocop-ast-1.38.0/lib/rubocop/ast/node/mixin/predicate_operator_node.rb	2025-02-03 03:11:24.365226152 +0000
                @@ -16,0 +17,5 @@
                +      LOGICAL_OPERATORS = [LOGICAL_AND, LOGICAL_OR].freeze
                +      private_constant :LOGICAL_OPERATORS
                +      SEMANTIC_OPERATORS = [SEMANTIC_AND, SEMANTIC_OR].freeze
                +      private_constant :SEMANTIC_OPERATORS
                +
                @@ -28 +33 @@
                -        operator == LOGICAL_AND || operator == LOGICAL_OR
                +        LOGICAL_OPERATORS.include?(operator)
                @@ -35 +40 @@
                -        operator == SEMANTIC_AND || operator == SEMANTIC_OR
                +        SEMANTIC_OPERATORS.include?(operator)
        lib/rubocop/ast/node/str_node.rb
                --- /tmp/d20250203-13880-f1ksez/rubocop-ast-1.37.0/lib/rubocop/ast/node/str_node.rb	2025-02-03 03:11:24.353226147 +0000
                +++ /tmp/d20250203-13880-f1ksez/rubocop-ast-1.38.0/lib/rubocop/ast/node/str_node.rb	2025-02-03 03:11:24.367226153 +0000
                @@ -15,0 +16 @@
                +      private_constant :PERCENT_LITERAL_TYPES
                @@ -45,2 +46 @@
                -        opening_delimiter = loc.begin if loc.respond_to?(:begin)
                -        return false unless opening_delimiter
                +        return false unless loc?(:begin)
                @@ -49 +49 @@
                -          opening_delimiter.source.match?(PERCENT_LITERAL_TYPES.fetch(type))
                +          loc.begin.source.match?(PERCENT_LITERAL_TYPES.fetch(type))
                @@ -51 +51 @@
                -          opening_delimiter.source.start_with?('%')
                +          loc.begin.source.start_with?('%')
        lib/rubocop/ast/node_pattern/node.rb
                --- /tmp/d20250203-13880-f1ksez/rubocop-ast-1.37.0/lib/rubocop/ast/node_pattern/node.rb	2025-02-03 03:11:24.356226148 +0000
                +++ /tmp/d20250203-13880-f1ksez/rubocop-ast-1.38.0/lib/rubocop/ast/node_pattern/node.rb	2025-02-03 03:11:24.370226153 +0000
                @@ -51 +51 @@
                -        # @return [Integer] nb of captures of that node and its descendants
                +        # @return [Integer] nb of captures that this node will emit
                @@ -244,0 +245,6 @@
                +          end
                +
                +          # Each child in a union must contain the same number
                +          # of captures. Only one branch ends up capturing.
                +          def nb_captures
                +            child.nb_captures
        lib/rubocop/ast/processed_source.rb
                --- /tmp/d20250203-13880-f1ksez/rubocop-ast-1.37.0/lib/rubocop/ast/processed_source.rb	2025-02-03 03:11:24.357226149 +0000
                +++ /tmp/d20250203-13880-f1ksez/rubocop-ast-1.38.0/lib/rubocop/ast/processed_source.rb	2025-02-03 03:11:24.371226154 +0000
                @@ -288,6 +288 @@
                -          begin
                -            require 'prism'
                -          rescue LoadError
                -            warn "Error: Unable to load Prism. Add `gem 'prism'` to your Gemfile."
                -            exit!
                -          end
                +          require_prism
                @@ -297 +292 @@
                -            require 'prism/translation/parser33'
                +            require_prism_translation_parser(ruby_version)
                @@ -300 +295 @@
                -            require 'prism/translation/parser34'
                +            require_prism_translation_parser(ruby_version)
                @@ -306,0 +302,25 @@
                +      end
                +
                +      # Prism is a native extension, a `LoadError` will be raised if linked to an incompatible
                +      # Ruby version. Only raise if it really was caused by Prism not being present.
                +      def require_prism
                +        require 'prism'
                +      rescue LoadError => e
                +        raise unless e.path == 'prism'
                +
                +        warn "Error: Unable to load Prism. Add `gem 'prism'` to your Gemfile."
                +        exit!
                +      end
                +
                +      # While Prism is not yet a dependency, users may run with outdated versions that
                +      # don't have all the parsers.
                +      def require_prism_translation_parser(version)
                +        require "prism/translation/parser#{version.to_s.delete('.')}"
                +      rescue LoadError
                +        warn <<~MESSAGE
                +          Error: Unable to load Prism parser for Ruby #{version}.
                +          * If you're using Bundler and don't yet have `gem 'prism'` as a dependency, add it now.
                +          * If you're using Bundler and already have `gem 'prism'` as a dependency, update it to the most recent version.
                +          * If you don't use Bundler, run `gem update prism`.
                +        MESSAGE
                +        exit!
        lib/rubocop/ast/token.rb
                --- /tmp/d20250203-13880-f1ksez/rubocop-ast-1.37.0/lib/rubocop/ast/token.rb	2025-02-03 03:11:24.357226149 +0000
                +++ /tmp/d20250203-13880-f1ksez/rubocop-ast-1.38.0/lib/rubocop/ast/token.rb	2025-02-03 03:11:24.371226154 +0000
                @@ -7,0 +8 @@
                +      LEFT_CURLY_TYPES = %i[tLCURLY tLAMBEG].freeze
                @@ -86 +87 @@
                -        type == :tLCURLY || type == :tLAMBEG
                +        LEFT_CURLY_TYPES.include?(type)
        lib/rubocop/ast/version.rb
                --- /tmp/d20250203-13880-f1ksez/rubocop-ast-1.37.0/lib/rubocop/ast/version.rb	2025-02-03 03:11:24.358226149 +0000
                +++ /tmp/d20250203-13880-f1ksez/rubocop-ast-1.38.0/lib/rubocop/ast/version.rb	2025-02-03 03:11:24.372226154 +0000
                @@ -6 +6 @@
                -      STRING = '1.37.0'
                +      STRING = '1.38.0'

Copy link

github-actions bot commented Feb 3, 2025

gem compare unicode-display_width 3.1.2 3.1.4

Compared versions: ["3.1.2", "3.1.4"]
  DIFFERENT date:
    3.1.2: 2024-11-20 00:00:00 UTC
    3.1.4: 2025-01-13 00:00:00 UTC
  DIFFERENT version:
    3.1.2: 3.1.2
    3.1.4: 3.1.4
  DIFFERENT files:
    3.1.2->3.1.4:
      * Changed:
            CHANGELOG.md +14/-0
            README.md +14/-5
            lib/unicode/display_width.rb +11/-3
            lib/unicode/display_width/constants.rb +1/-1
  DIFFERENT extra_rdoc_files:
    3.1.2->3.1.4:
      * Changed:
            README.md +14/-5
            CHANGELOG.md +14/-0

Copy link

github-actions bot commented Feb 3, 2025

gem compare --diff unicode-display_width 3.1.2 3.1.4

Compared versions: ["3.1.2", "3.1.4"]
  DIFFERENT files:
    3.1.2->3.1.4:
      * Changed:
        CHANGELOG.md
                --- /tmp/d20250203-14398-1fgcn/unicode-display_width-3.1.2/CHANGELOG.md	2025-02-03 03:11:45.595234909 +0000
                +++ /tmp/d20250203-14398-1fgcn/unicode-display_width-3.1.4/CHANGELOG.md	2025-02-03 03:11:45.597234910 +0000
                @@ -2,0 +3,13 @@
                +## 3.1.4
                +
                +- Fix that skin tone modifiers were ignored when used in a non-ZWJ sequence
                +  context (= single emoji char + modifier) #29
                +- Add more docs and specs about modifier handling
                +
                +## 3.1.3
                +
                +Better handling of non-UTF-8 strings, patch by @Earlopain:
                +
                +- Data with *BINARY* encoding is interpreted as UTF-8, if possible
                +- Use `invalid: :replace` and `undef: :replace` options when converting to UTF-8
                +
                @@ -29,0 +43 @@
                +
        README.md
                --- /tmp/d20250203-14398-1fgcn/unicode-display_width-3.1.2/README.md	2025-02-03 03:11:45.595234909 +0000
                +++ /tmp/d20250203-14398-1fgcn/unicode-display_width-3.1.4/README.md	2025-02-03 03:11:45.597234910 +0000
                @@ -73,0 +74,5 @@
                +### Encoding Notes
                +
                +- Data with *BINARY* encoding is interpreted as UTF-8, if possible
                +- Non-UTF-8 strings are converted to UTF-8 before measuring, using the [`{invalid: :replace, undef: :replace}`) options](https://ruby-doc.org/3.3.5/encodings_rdoc.html#label-Encoding+Options)
                +
                @@ -98,0 +104,2 @@
                +Finally, it varies if Skin Tone Modifiers can be applied to all characters or just to those with the "Emoji Base" property.
                +
                @@ -101,4 +108,6 @@
                -Basic/Single Emoji character without Variation Selector | No special handling
                -Basic/Single Emoji character with VS15 (Text)           | No special handling
                -Basic/Single Emoji character with VS16 (Emoji)          | 2 or East Asian Width (see table below)
                -Emoji Sequence                                          | 2 if Emoji belongs to configured Emoji set (see table below)
                +Basic/Single Emoji character without Variation Selector   | No special handling
                +Basic/Single Emoji character with VS15 (Text)             | No special handling
                +Basic/Single Emoji character with VS16 (Emoji)            | 2 or East Asian Width (see table below)
                +Single Emoji character with Skin Tone Modifier            | 2
                +Skin Tone Modifier used in isolation or with invalid base | 2 if Emoji mode is configured to `:rgi` / `:rgi_at`
                +Emoji Sequence                                            | 2 if Emoji belongs to configured Emoji set (see table below)
                @@ -129 +138 @@
                -Please note that Emoji display and number of terminal columns used might differs a lot. For example, it might be the case that a terminal does not understand which Emoji to display, but still manages to calculate the proper amount of terminal cells. The automatic Emoji support level per terminal only considers the latter (cursor position), not the actual Emoji image(s) displayed. Please [open an issue](https://github.com/janlelis/unicode-display_width/issues/new) if you notice your terminal application could use a better default value. Also see the [ucs-detect project](https://ucs-detect.readthedocs.io/results.html), which is a great resource that compares various terminal's Unicode/Emoji capabilities.
                +Please note that Emoji display and number of terminal columns used might differs a lot. For example, it might be the case that a terminal does not understand which Emoji to display, but still manages to calculate the proper amount of terminal cells. The automatic Emoji support level per terminal only considers the latter (cursor position), not the actual Emoji image(s) displayed. Please [open an issue](https://github.com/janlelis/unicode-display_width/issues/new) if you notice your terminal application could use a better default value. Also see the [ucs-detect project](https://ucs-detect.readthedocs.io/results.html), which is a great resource that compares various terminal's Unicode/Emoji capabilities. You can visually check how your terminals renders different kind of Emoji types with the [terminal-emoji-width.rb script](https://github.com/janlelis/unicode-display_width/blob/main/misc/terminal-emoji-width.rb).
        lib/unicode/display_width.rb
                --- /tmp/d20250203-14398-1fgcn/unicode-display_width-3.1.2/lib/unicode/display_width.rb	2025-02-03 03:11:45.596234909 +0000
                +++ /tmp/d20250203-14398-1fgcn/unicode-display_width-3.1.4/lib/unicode/display_width.rb	2025-02-03 03:11:45.598234910 +0000
                @@ -45 +45,3 @@
                -    REGEX_EMOJI_ALL_SEQUENCES = Regexp.union(/.[\u{1F3FB}-\u{1F3FF}\u{FE0F}]?(\u{200D}.[\u{1F3FB}-\u{1F3FF}\u{FE0F}]?)+/, Unicode::Emoji::REGEX_EMOJI_KEYCAP)
                +
                +    # ebase = Unicode::Emoji::REGEX_PROP_MODIFIER_BASE.source
                +    REGEX_EMOJI_ALL_SEQUENCES = Regexp.union(/.[\u{1F3FB}-\u{1F3FF}\u{FE0F}]?(\u{200D}.[\u{1F3FB}-\u{1F3FF}\u{FE0F}]?)+|.[\u{1F3FB}-\u{1F3FF}]/, Unicode::Emoji::REGEX_EMOJI_KEYCAP)
                @@ -50 +52,8 @@
                -      string = string.encode(Encoding::UTF_8) unless string.encoding == Encoding::UTF_8
                +      # Binary strings don't make much sense when calculating display width.
                +      # Assume it's valid UTF-8
                +      if string.encoding == Encoding::BINARY && !string.force_encoding(Encoding::UTF_8).valid_encoding?
                +        # Didn't work out, go back to binary
                +        string.force_encoding(Encoding::BINARY)
                +      end
                +
                +      string = string.encode(Encoding::UTF_8, invalid: :replace, undef: :replace) unless string.encoding == Encoding::UTF_8
                @@ -239 +247,0 @@
                -
        lib/unicode/display_width/constants.rb
                --- /tmp/d20250203-14398-1fgcn/unicode-display_width-3.1.2/lib/unicode/display_width/constants.rb	2025-02-03 03:11:45.596234909 +0000
                +++ /tmp/d20250203-14398-1fgcn/unicode-display_width-3.1.4/lib/unicode/display_width/constants.rb	2025-02-03 03:11:45.598234910 +0000
                @@ -5 +5 @@
                -    VERSION = "3.1.2"
                +    VERSION = "3.1.4"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants