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.70.0 #711

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 Jan 13, 2025

Bumps rubocop from 1.69.2 to 1.70.0.

Release notes

Sourced from rubocop's releases.

RuboCop 1.70

New features

  • #13474: Add new Style/ItAssignment cop to detect local assignments to it inside blocks. ([@​dvandersluis][])
  • #11013: Add new Lint/SharedMutableDefault cop to alert on mutable Hash defaults. ([@​corsonknowles][])
  • #13612: Create new cop Lint/ConstantReassignment. ([@​lovro-bikic][])
  • #13628: Make LSP server support quick fix code action. ([@​koic][])
  • #13607: Support passing the target ruby version through an environment variable. ([@​elliottt][])
  • #13628: Add support for Ruby LSP as a built-in add-on. ([@​koic][])
  • #13284: Add new target_gem_version API to change behavior of a cop at runtime depending on which gem version is present. ([@​earlopain][])

Bug fixes

  • #13589: Fix Lint/NonAtomicFileOperation to detect offenses with fully qualified constants. ([@​viralpraxis][])
  • #13630: Fix CLI --format option to accept fully qualified formatter class names. ([@​viralpraxis][])
  • #13624: Don't show warnings from Lint/Syntax when a syntax error occurs. ([@​earlopain][])
  • #13605: Fix RuboCop::Cop::Util.to_string_literal to work correctly with frozen strings. ([@​viralpraxis][])
  • #12393: Fix false negatives for Lint/Void inside of non-modifier conditionals. ([@​GabeIsman][])
  • #13623: Fix false negatives for Style/MultipleComparison when setting AllowMethodComparison: false and comparing with simple method calls. ([@​koic][])
  • #13644: Fix a false positive for Layout/EmptyLinesAroundAccessModifier when an access modifier and an expression are on the same line. ([@​koic][])
  • #13645: Fix a false positive for Style/MethodCallWithArgsParentheses when setting EnforcedStyle: omit_parentheses and last argument is an endless range. ([@​earlopain][])
  • #13614: Fix false positives for Style/RaiseArgs with anonymous splat and triple dot forwarding. ([@​earlopain][])
  • #13591: Fix false positives for Lint/NestedMethodDefinition when defining a method on a constant or a method call. ([@​koic][])
  • #13594: Fix false positives for Style/MultipleComparison when using multiple safe navigation method calls. ([@​koic][])
  • #13654: Fix false positives for Style/RedundantInitialize when empty initialize method has arguments. ([@​marocchino][])
  • #13608: Fix crash when running rubocop -d on a config with a remote inherit_from that causes a duplicate setting warning. ([@​dvandersluis][])
  • #12430: Fix false negatives in Style/RedundantLineContinuation with multiple line continuations. ([@​dvandersluis][])
  • #13638: Fix false positive for Naming/BlockForwarding when method just returns the block argument. ([@​mvz][])
  • #13599: Fix incorrect autocorrect for Layout/HashAlignment when there is a multiline positional argument and Layout/ArgumentAlignment is configured with EnforcedStyle: with_fixed_indentation. ([@​dvandersluis][])
  • #13586: Fix regression in Layout/SpaceAroundOperators when different comparison operators were aligned with each other. ([@​dvandersluis][])
  • #13603: Fix Lint/LiteralInInterpolation cop error on invalid string literal. ([@​viralpraxis][])
  • #13582: Fix Lint/NonAtomicFileOperation cop error on non-constant receiver. ([@​viralpraxis][])
  • #13598: Fix Lint/Void cop error on if without body. ([@​viralpraxis][])
  • #13634: Fix Style/ClassAndModuleChildren cop error on compact enforced style and unindented body. ([@​viralpraxis][])
  • #13642: Fix Style/FloatDivision cop error if #to_f has implicit receiver. ([@​viralpraxis][])
  • #13517: Fixes Style/HashExcept to recognize safe navigation when ActiveSupportExtensionsEnabled config is enabled. ([@​lovro-bikic][])
  • #13585: Fix Style/HashSyntax cop error on implicit call method. ([@​viralpraxis][])
  • #13632: Fix Style/MissingElse cop error if Style/EmptyElse's EnforcedStyle is not both and if expression contains elsif. ([@​viralpraxis][])
  • #13659: Fix Style/MissingElse cop error if Style/EmptyElse's EnforcedStyle is not both and if expression contains multiple elsif. ([@​viralpraxis][])
  • #13596: Fix Style/RedundantCondition cop error on parentheses and modifier if in else. ([@​viralpraxis][])
  • #13616: Fix incorrect autocorrect for Style/RedundantRegexpArgument when the regex contains a single quote. ([@​mrzasa][])
  • #13619: Fix Style/YodaExpression cop error in case of suffix form of operator. ([@​viralpraxis][])
  • #13578: Update Layout/LineContinuationSpacing to ignore continuations inside a regexp or xstr. ([@​dvandersluis][])
  • #13601: Update Style/SuperArguments to handle super with a block or with a chained method with a block. ([@​dvandersluis][])
  • #13568: Fix NoMethodError in ConfigValidator when a Cop's config is not a Hash and raise ValidationError instead. ([@​amomchilov][])

Changes

... (truncated)

Changelog

Sourced from rubocop's changelog.

1.70.0 (2025-01-10)

New features

  • #13474: Add new Style/ItAssignment cop to detect local assignments to it inside blocks. ([@​dvandersluis][])
  • #11013: Add new Lint/SharedMutableDefault cop to alert on mutable Hash defaults. ([@​corsonknowles][])
  • #13612: Create new cop Lint/ConstantReassignment. ([@​lovro-bikic][])
  • #13628: Make LSP server support quick fix code action. ([@​koic][])
  • #13607: Support passing the target ruby version through an environment variable. ([@​elliottt][])
  • #13628: Add support for Ruby LSP as a built-in add-on. ([@​koic][])
  • #13284: Add new target_gem_version API to change behavior of a cop at runtime depending on which gem version is present. ([@​earlopain][])

Bug fixes

  • #13589: Fix Lint/NonAtomicFileOperation to detect offenses with fully qualified constants. ([@​viralpraxis][])
  • #13630: Fix CLI --format option to accept fully qualified formatter class names. ([@​viralpraxis][])
  • #13624: Don't show warnings from Lint/Syntax when a syntax error occurs. ([@​earlopain][])
  • #13605: Fix RuboCop::Cop::Util.to_string_literal to work correctly with frozen strings. ([@​viralpraxis][])
  • #12393: Fix false negatives for Lint/Void inside of non-modifier conditionals. ([@​GabeIsman][])
  • #13623: Fix false negatives for Style/MultipleComparison when setting AllowMethodComparison: false and comparing with simple method calls. ([@​koic][])
  • #13644: Fix a false positive for Layout/EmptyLinesAroundAccessModifier when an access modifier and an expression are on the same line. ([@​koic][])
  • #13645: Fix a false positive for Style/MethodCallWithArgsParentheses when setting EnforcedStyle: omit_parentheses and last argument is an endless range. ([@​earlopain][])
  • #13614: Fix false positives for Style/RaiseArgs with anonymous splat and triple dot forwarding. ([@​earlopain][])
  • #13591: Fix false positives for Lint/NestedMethodDefinition when defining a method on a constant or a method call. ([@​koic][])
  • #13594: Fix false positives for Style/MultipleComparison when using multiple safe navigation method calls. ([@​koic][])
  • #13654: Fix false positives for Style/RedundantInitialize when empty initialize method has arguments. ([@​marocchino][])
  • #13608: Fix crash when running rubocop -d on a config with a remote inherit_from that causes a duplicate setting warning. ([@​dvandersluis][])
  • #12430: Fix false negatives in Style/RedundantLineContinuation with multiple line continuations. ([@​dvandersluis][])
  • #13638: Fix false positive for Naming/BlockForwarding when method just returns the block argument. ([@​mvz][])
  • #13599: Fix incorrect autocorrect for Layout/HashAlignment when there is a multiline positional argument and Layout/ArgumentAlignment is configured with EnforcedStyle: with_fixed_indentation. ([@​dvandersluis][])
  • #13586: Fix regression in Layout/SpaceAroundOperators when different comparison operators were aligned with each other. ([@​dvandersluis][])
  • #13603: Fix Lint/LiteralInInterpolation cop error on invalid string literal. ([@​viralpraxis][])
  • #13582: Fix Lint/NonAtomicFileOperation cop error on non-constant receiver. ([@​viralpraxis][])
  • #13598: Fix Lint/Void cop error on if without body. ([@​viralpraxis][])
  • #13634: Fix Style/ClassAndModuleChildren cop error on compact enforced style and unindented body. ([@​viralpraxis][])
  • #13642: Fix Style/FloatDivision cop error if #to_f has implicit receiver. ([@​viralpraxis][])
  • #13517: Fixes Style/HashExcept to recognize safe navigation when ActiveSupportExtensionsEnabled config is enabled. ([@​lovro-bikic][])
  • #13585: Fix Style/HashSyntax cop error on implicit call method. ([@​viralpraxis][])
  • #13632: Fix Style/MissingElse cop error if Style/EmptyElse's EnforcedStyle is not both and if expression contains elsif. ([@​viralpraxis][])
  • #13659: Fix Style/MissingElse cop error if Style/EmptyElse's EnforcedStyle is not both and if expression contains multiple elsif. ([@​viralpraxis][])
  • #13596: Fix Style/RedundantCondition cop error on parentheses and modifier if in else. ([@​viralpraxis][])
  • #13616: Fix incorrect autocorrect for Style/RedundantRegexpArgument when the regex contains a single quote. ([@​mrzasa][])
  • #13619: Fix Style/YodaExpression cop error in case of suffix form of operator. ([@​viralpraxis][])
  • #13578: Update Layout/LineContinuationSpacing to ignore continuations inside a regexp or xstr. ([@​dvandersluis][])
  • #13601: Update Style/SuperArguments to handle super with a block or with a chained method with a block. ([@​dvandersluis][])
  • #13568: Fix NoMethodError in ConfigValidator when a Cop's config is not a Hash and raise ValidationError instead. ([@​amomchilov][])

Changes

... (truncated)

Commits
  • e2f2d5c Cut 1.70
  • 3994f94 Update Changelog
  • 3123800 Dont show parser warnings in Lint/Syntax
  • 9eaedd0 Add Lint/ConstantReassignment cop
  • 4981738 Fix to recognize safe navigation when config is enabled
  • 6f066b8 Fix build errors related to the RubyLSP add-on specs
  • 45cd66a [Fix #13601] Update Style/SuperArguments to handle super with a block or ...
  • 2bfe0f7 Update Style/SuperArguments to handle super with a block or with a chaine...
  • 5d2be60 Update Style/SuperArguments to handle super with a block
  • e3bcc67 Add range formatting method to the formatter add-on
  • 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.70.0.
- [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.70.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies ruby Pull requests that update Ruby code labels Jan 13, 2025
Copy link

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

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/20250113-2282-genahn	2025-01-13 03:48:17.434575884 +0000
                +++ /tmp/d20250113-2282-t7hhw7/regexp_parser-2.10.0/lib/regexp_parser/expression/methods/escape_sequence_char.rb	2025-01-13 03:48:17.425575662 +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/20250113-2282-ly5tvs	2025-01-13 03:48:17.437575958 +0000
                +++ /tmp/d20250113-2282-t7hhw7/regexp_parser-2.10.0/lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb	2025-01-13 03:48:17.425575662 +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/20250113-2282-u65ro1	2025-01-13 03:48:17.438575983 +0000
                +++ /tmp/d20250113-2282-t7hhw7/regexp_parser-2.10.0/lib/regexp_parser/expression/methods/referenced_expressions.rb	2025-01-13 03:48:17.426575687 +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/d20250113-2282-t7hhw7/regexp_parser-2.9.3/lib/regexp_parser/expression.rb	2025-01-13 03:48:17.409575267 +0000
                +++ /tmp/d20250113-2282-t7hhw7/regexp_parser-2.10.0/lib/regexp_parser/expression.rb	2025-01-13 03:48:17.422575588 +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/d20250113-2282-t7hhw7/regexp_parser-2.9.3/lib/regexp_parser/expression/classes/backreference.rb	2025-01-13 03:48:17.410575292 +0000
                +++ /tmp/d20250113-2282-t7hhw7/regexp_parser-2.10.0/lib/regexp_parser/expression/classes/backreference.rb	2025-01-13 03:48:17.423575613 +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/d20250113-2282-t7hhw7/regexp_parser-2.9.3/lib/regexp_parser/expression/classes/conditional.rb	2025-01-13 03:48:17.411575317 +0000
                +++ /tmp/d20250113-2282-t7hhw7/regexp_parser-2.10.0/lib/regexp_parser/expression/classes/conditional.rb	2025-01-13 03:48:17.424575637 +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/d20250113-2282-t7hhw7/regexp_parser-2.9.3/lib/regexp_parser/expression/classes/escape_sequence.rb	2025-01-13 03:48:17.411575317 +0000
                +++ /tmp/d20250113-2282-t7hhw7/regexp_parser-2.10.0/lib/regexp_parser/expression/classes/escape_sequence.rb	2025-01-13 03:48:17.424575637 +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/d20250113-2282-t7hhw7/regexp_parser-2.9.3/lib/regexp_parser/parser.rb	2025-01-13 03:48:17.415575415 +0000
                +++ /tmp/d20250113-2282-t7hhw7/regexp_parser-2.10.0/lib/regexp_parser/parser.rb	2025-01-13 03:48:17.428575736 +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/d20250113-2282-t7hhw7/regexp_parser-2.9.3/lib/regexp_parser/version.rb	2025-01-13 03:48:17.421575563 +0000
                +++ /tmp/d20250113-2282-t7hhw7/regexp_parser-2.10.0/lib/regexp_parser/version.rb	2025-01-13 03:48:17.434575884 +0000
                @@ -3 +3 @@
                -    VERSION = '2.9.3'
                +    VERSION = '2.10.0'

Copy link

gem compare rubocop 1.69.2 1.70.0

Compared versions: ["1.69.2", "1.70.0"]
  DIFFERENT date:
    1.69.2: 2024-12-12 00:00:00 UTC
    1.70.0: 2025-01-10 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.70.0: {"homepage_uri" => "https://rubocop.org/", "changelog_uri" => "https://github.com/rubocop/rubocop/releases/tag/v1.70.0", "source_code_uri" => "https://github.com/rubocop/rubocop/", "documentation_uri" => "https://docs.rubocop.org/rubocop/1.70/", "bug_tracker_uri" => "https://github.com/rubocop/rubocop/issues", "rubygems_mfa_required" => "true"}
  DIFFERENT version:
    1.69.2: 1.69.2
    1.70.0: 1.70.0
  DIFFERENT files:
    1.69.2->1.70.0:
      * Added:
            lib/rubocop/cop/internal_affairs/cop_enabled.rb +85/-0
            lib/rubocop/cop/lint/constant_reassignment.rb +152/-0
            lib/rubocop/cop/lint/shared_mutable_default.rb +65/-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 +19/-2
            lib/rubocop.rb +3/-0
            lib/rubocop/cli/command/execute_runner.rb +3/-3
            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/base.rb +6/-0
            lib/rubocop/cop/bundler/gem_comment.rb +1/-1
            lib/rubocop/cop/internal_affairs.rb +1/-0
            lib/rubocop/cop/internal_affairs/node_type_predicate.rb +4/-3
            lib/rubocop/cop/layout/argument_alignment.rb +1/-7
            lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb +1/-0
            lib/rubocop/cop/layout/extra_spacing.rb +1/-1
            lib/rubocop/cop/layout/first_argument_indentation.rb +2/-7
            lib/rubocop/cop/layout/first_array_element_indentation.rb +2/-7
            lib/rubocop/cop/layout/first_hash_element_indentation.rb +1/-6
            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 +1/-1
            lib/rubocop/cop/layout/line_length.rb +1/-0
            lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb +24/-0
            lib/rubocop/cop/layout/redundant_line_break.rb +1/-1
            lib/rubocop/cop/layout/space_after_method_name.rb +1/-1
            lib/rubocop/cop/layout/space_around_operators.rb +3/-3
            lib/rubocop/cop/layout/trailing_whitespace.rb +5/-3
            lib/rubocop/cop/lint/duplicate_set_element.rb +20/-7
            lib/rubocop/cop/lint/literal_in_interpolation.rb +11/-3
            lib/rubocop/cop/lint/nested_method_definition.rb +5/-1
            lib/rubocop/cop/lint/non_atomic_file_operation.rb +4/-3
            lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb +6/-14
            lib/rubocop/cop/lint/syntax.rb +4/-1
            lib/rubocop/cop/lint/unescaped_bracket_in_regexp.rb +1/-4
            lib/rubocop/cop/lint/void.rb +3/-2
            lib/rubocop/cop/metrics/method_length.rb +8/-1
            lib/rubocop/cop/mixin/check_line_breakable.rb +7/-7
            lib/rubocop/cop/mixin/comments_help.rb +2/-0
            lib/rubocop/cop/mixin/dig_help.rb +1/-1
            lib/rubocop/cop/mixin/preceding_following_alignment.rb +26/-16
            lib/rubocop/cop/mixin/space_before_punctuation.rb +1/-1
            lib/rubocop/cop/mixin/statement_modifier.rb +1/-1
            lib/rubocop/cop/mixin/string_literals_help.rb +1/-1
            lib/rubocop/cop/naming/block_forwarding.rb +1/-1
            lib/rubocop/cop/style/access_modifier_declarations.rb +32/-1
            lib/rubocop/cop/style/and_or.rb +1/-1
            lib/rubocop/cop/style/arguments_forwarding.rb +1/-4
            lib/rubocop/cop/style/class_and_module_children.rb +5/-2
            lib/rubocop/cop/style/each_for_simple_loop.rb +3/-6
            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/exact_regexp_match.rb +2/-9
            lib/rubocop/cop/style/exponential_notation.rb +1/-1
            lib/rubocop/cop/style/float_division.rb +8/-4
            lib/rubocop/cop/style/hash_except.rb +54/-67
            lib/rubocop/cop/style/hash_syntax.rb +5/-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 +11/-1
            lib/rubocop/cop/style/missing_else.rb +2/-0
            lib/rubocop/cop/style/multiple_comparison.rb +26/-20
            lib/rubocop/cop/style/mutable_constant.rb +1/-1
            lib/rubocop/cop/style/object_then.rb +13/-15
            lib/rubocop/cop/style/quoted_symbols.rb +1/-1
            lib/rubocop/cop/style/raise_args.rb +5/-3
            lib/rubocop/cop/style/random_with_offset.rb +3/-3
            lib/rubocop/cop/style/redundant_current_directory_in_path.rb +2/-1
            lib/rubocop/cop/style/redundant_initialize.rb +12/-3
            lib/rubocop/cop/style/redundant_line_continuation.rb +7/-3
            lib/rubocop/cop/style/redundant_parentheses.rb +1/-4
            lib/rubocop/cop/style/redundant_regexp_argument.rb +3/-0
            lib/rubocop/cop/style/redundant_self_assignment.rb +6/-5
            lib/rubocop/cop/style/safe_navigation.rb +1/-1
            lib/rubocop/cop/style/send_with_literal_method_name.rb +2/-1
            lib/rubocop/cop/style/single_line_do_end_block.rb +1/-2
            lib/rubocop/cop/style/single_line_methods.rb +2/-3
            lib/rubocop/cop/style/slicing_with_range.rb +40/-11
            lib/rubocop/cop/style/super_arguments.rb +63/-15
            lib/rubocop/cop/style/yoda_condition.rb +8/-4
            lib/rubocop/cop/style/yoda_expression.rb +1/-0
            lib/rubocop/cop/util.rb +9/-2
            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/path_util.rb +11/-8
            lib/rubocop/rspec/shared_contexts.rb +4/-1
            lib/rubocop/runner.rb +5/-6
            lib/rubocop/target_ruby.rb +15/-0
            lib/rubocop/version.rb +1/-1
  DIFFERENT extra_rdoc_files:
    1.69.2->1.70.0:
      * Changed:
            LICENSE.txt +1/-1
            README.md +2/-2

Copy link

gem compare --diff rubocop 1.69.2 1.70.0

Diff too large (143899 chars)

Copy link

gem compare unicode-display_width 3.1.2 3.1.3

Compared versions: ["3.1.2", "3.1.3"]
  DIFFERENT date:
    3.1.2: 2024-11-20 00:00:00 UTC
    3.1.3: 2024-12-26 00:00:00 UTC
  DIFFERENT rubygems_version:
    3.1.2: 3.5.21
    3.1.3: 3.1.6
  DIFFERENT version:
    3.1.2: 3.1.2
    3.1.3: 3.1.3
  DIFFERENT files:
    3.1.2->3.1.3:
      * Changed:
            CHANGELOG.md +8/-0
            README.md +6/-1
            lib/unicode/display_width.rb +8/-2
            lib/unicode/display_width/constants.rb +1/-1
  DIFFERENT extra_rdoc_files:
    3.1.2->3.1.3:
      * Changed:
            README.md +6/-1
            CHANGELOG.md +8/-0

Copy link

gem compare --diff unicode-display_width 3.1.2 3.1.3

Compared versions: ["3.1.2", "3.1.3"]
  DIFFERENT files:
    3.1.2->3.1.3:
      * Changed:
        CHANGELOG.md
                --- /tmp/d20250113-9722-sz416u/unicode-display_width-3.1.2/CHANGELOG.md	2025-01-13 03:49:08.985782915 +0000
                +++ /tmp/d20250113-9722-sz416u/unicode-display_width-3.1.3/CHANGELOG.md	2025-01-13 03:49:08.987782960 +0000
                @@ -2,0 +3,7 @@
                +## 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 +37 @@
                +
        README.md
                --- /tmp/d20250113-9722-sz416u/unicode-display_width-3.1.2/README.md	2025-01-13 03:49:08.985782915 +0000
                +++ /tmp/d20250113-9722-sz416u/unicode-display_width-3.1.3/README.md	2025-01-13 03:49:08.987782960 +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)
                +
                @@ -129 +134 @@
                -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 checkout how your terminals renders different kind of Emoji types with this [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/d20250113-9722-sz416u/unicode-display_width-3.1.2/lib/unicode/display_width.rb	2025-01-13 03:49:08.986782938 +0000
                +++ /tmp/d20250113-9722-sz416u/unicode-display_width-3.1.3/lib/unicode/display_width.rb	2025-01-13 03:49:08.988782982 +0000
                @@ -50 +50,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 +245,0 @@
                -
        lib/unicode/display_width/constants.rb
                --- /tmp/d20250113-9722-sz416u/unicode-display_width-3.1.2/lib/unicode/display_width/constants.rb	2025-01-13 03:49:08.986782938 +0000
                +++ /tmp/d20250113-9722-sz416u/unicode-display_width-3.1.3/lib/unicode/display_width/constants.rb	2025-01-13 03:49:08.988782982 +0000
                @@ -5 +5 @@
                -    VERSION = "3.1.2"
                +    VERSION = "3.1.3"

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