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.0 to 1.69.1 #694

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 Dec 4, 2024

Bumps rubocop from 1.69.0 to 1.69.1.

Release notes

Sourced from rubocop's releases.

RuboCop 1.69.1

Bug fixes

  • #13502: Fix an incorrect autocorrect for Style/DigChain when using safe navigation method chain with dig method. (@​koic)
  • #13505: Fix an error for Style/ParallelAssignment when using the anonymous splat operator. (@​earlopain)
  • #13184: Fix some false positives in Lint/UnreachableCode. (@​isuckatcs)
  • #13494: Fix false positives for Style/HashExcept cop when using reject/!include?, reject/!in? or select/!exclude? combinations. (@​lovro-bikic)
  • #13522: Fix Lint/UnescapedBracketInRegexp cop failure with invalid regular expression. (@​viralpraxis)
  • #13523: Fix Style::AccessModifierDeclarations cop failure in case of if node without else. (@​viralpraxis)
  • #13524: Fix Style/RedundantArgument cop failure while inspecting string literal with invalid encoding. (@​viralpraxis)
  • #13528: Fix Style/RedundantParentheses cop failure in case of splatted case node without condition. (@​viralpraxis)
  • #13521: Fix Style/RedundantSelf cop failure with kwnilarg argument node. (@​viralpraxis)
  • #13526: Fix Style/StringConcatenation cop failure when there are mixed implicit and explicit concatenations. (@​viralpraxis)
  • #13511: Fix false positive in Lint/UnescapedBracketInRegexp when using regexp_parser 2.9.2 and earlier. (@​dvandersluis)
  • #13096: Update Style/BlockDelimiters to not change braces when they are required for syntax. (@​dvandersluis)
  • #13512: Update Style/LambdaCall to be aware of safe navigation. (@​dvandersluis)
Changelog

Sourced from rubocop's changelog.

1.69.1 (2024-12-03)

Bug fixes

  • #13502: Fix an incorrect autocorrect for Style/DigChain when using safe navigation method chain with dig method. ([@​koic][])
  • #13505: Fix an error for Style/ParallelAssignment when using the anonymous splat operator. ([@​earlopain][])
  • #13184: Fix some false positives in Lint/UnreachableCode. ([@​isuckatcs][])
  • #13494: Fix false positives for Style/HashExcept cop when using reject/!include?, reject/!in? or select/!exclude? combinations. ([@​lovro-bikic][])
  • #13522: Fix Lint/UnescapedBracketInRegexp cop failure with invalid regular expression. ([@​viralpraxis][])
  • #13523: Fix Style::AccessModifierDeclarations cop failure in case of if node without else. ([@​viralpraxis][])
  • #13524: Fix Style/RedundantArgument cop failure while inspecting string literal with invalid encoding. ([@​viralpraxis][])
  • #13528: Fix Style/RedundantParentheses cop failure in case of splatted case node without condition. ([@​viralpraxis][])
  • #13521: Fix Style/RedundantSelf cop failure with kwnilarg argument node. ([@​viralpraxis][])
  • #13526: Fix Style/StringConcatenation cop failure when there are mixed implicit and explicit concatenations. ([@​viralpraxis][])
  • #13511: Fix false positive in Lint/UnescapedBracketInRegexp when using regexp_parser 2.9.2 and earlier. ([@​dvandersluis][])
  • #13096: Update Style/BlockDelimiters to not change braces when they are required for syntax. ([@​dvandersluis][])
  • #13512: Update Style/LambdaCall to be aware of safe navigation. ([@​dvandersluis][])
Commits
  • 3d95b38 Cut 1.69.1
  • c60ffa5 Update Changelog
  • 4f2ac18 Lint/BinaryOperatorWithIdenticalOperands: Remove MATH_OPERATORS as they will ...
  • ea4aa48 Merge pull request #13529 from dvandersluis/generator-internal-affairs
  • 12e1ea2 Update rake new_cop to handle InternalAffairs cops
  • 84f3d43 Specify maximum_target_ruby_version for a handful of cops, document it
  • ef8009c Merge pull request #13531 from rubocop/dependabot/github_actions/karancode/ya...
  • 7715ed7 Bump karancode/yamllint-github-action from 2.1.1 to 3.0.0
  • cc43be0 Merge pull request #13528 from viralpraxis/fix-style-redundant-parentheses-co...
  • bd8b674 Fix Style/RedundantParentheses cop failure in case of splatted case node ...
  • 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.0 to 1.69.1.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](rubocop/rubocop@v1.69.0...v1.69.1)

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

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

github-actions bot commented Dec 4, 2024

Copy link

github-actions bot commented Dec 4, 2024

gem compare json 2.8.2 2.9.0

Compared versions: ["2.8.2", "2.9.0"]
  DIFFERENT date:
    2.8.2: 2024-11-14 00:00:00 UTC
    2.9.0: 2024-12-03 00:00:00 UTC
  DIFFERENT require_paths:
    2.8.2: ["/opt/hostedtoolcache/Ruby/3.3.6/x64/lib/ruby/gems/3.3.0/extensions/x86_64-linux/3.3.0/json-2.8.2", "lib"]
    2.9.0: ["/opt/hostedtoolcache/Ruby/3.3.6/x64/lib/ruby/gems/3.3.0/extensions/x86_64-linux/3.3.0/json-2.9.0", "lib"]
  DIFFERENT version:
    2.8.2: 2.8.2
    2.9.0: 2.9.0
  DIFFERENT files:
    2.8.2->2.9.0:
      * Changed:
            CHANGES.md +9/-0
            ext/json/ext/fbuffer/fbuffer.h +46/-16
            ext/json/ext/generator/generator.c +68/-40
            ext/json/ext/parser/extconf.rb +0/-1
            ext/json/ext/parser/parser.c +124/-132
            ext/json/ext/parser/parser.rl +8/-16
            lib/json/common.rb +38/-18
            lib/json/ext/generator/state.rb +11/-0
            lib/json/truffle_ruby/generator.rb +25/-17
            lib/json/version.rb +1/-1

Copy link

github-actions bot commented Dec 4, 2024

gem compare --diff json 2.8.2 2.9.0

Compared versions: ["2.8.2", "2.9.0"]
  DIFFERENT files:
    2.8.2->2.9.0:
      * Changed:
        CHANGES.md
                --- /tmp/d20241204-1957-270ev5/json-2.8.2/CHANGES.md	2024-12-04 03:06:20.669355329 +0000
                +++ /tmp/d20241204-1957-270ev5/json-2.9.0/CHANGES.md	2024-12-04 03:06:20.673355416 +0000
                @@ -2,0 +3,8 @@
                +### 2024-12-03 (2.9.0)
                +
                +* Fix C implementation of `script_safe` escaping to not confuse some other 3 wide characters with `\u2028` and `\u2029`.
                +  e.g. `JSON.generate(["倩", "瀨"], script_safe: true)` would generate the wrong JSON.
                +* `JSON.dump(object, some_io)` now write into the IO in chunks while previously it would buffer the entire JSON before writing.
                +* `JSON::GeneratorError` now has a `#invalid_object` attribute, making it easier to understand why an object tree cannot be serialized.
                +* Numerous improvements to the JRuby extension.
                +
                @@ -20,0 +29 @@
                +* `JSON.pretty_generate` no longer include newline inside empty object and arrays. 
        ext/json/ext/fbuffer/fbuffer.h
                --- /tmp/d20241204-1957-270ev5/json-2.8.2/ext/json/ext/fbuffer/fbuffer.h	2024-12-04 03:06:20.669355329 +0000
                +++ /tmp/d20241204-1957-270ev5/json-2.9.0/ext/json/ext/fbuffer/fbuffer.h	2024-12-04 03:06:20.677355504 +0000
                @@ -48,0 +49 @@
                +    VALUE io;
                @@ -51,0 +53 @@
                +#define FBUFFER_IO_BUFFER_SIZE (16384 - 1)
                @@ -69 +71 @@
                -static VALUE fbuffer_to_s(FBuffer *fb);
                +static VALUE fbuffer_finalize(FBuffer *fb);
                @@ -89 +90,0 @@
                -#ifndef JSON_GENERATOR
                @@ -94 +94,0 @@
                -#endif
                @@ -96 +96 @@
                -static void fbuffer_do_inc_capa(FBuffer *fb, unsigned long requested)
                +static void fbuffer_flush(FBuffer *fb)
                @@ -98,8 +98,3 @@
                -    unsigned long required;
                -
                -    if (RB_UNLIKELY(!fb->ptr)) {
                -        fb->ptr = ALLOC_N(char, fb->initial_length);
                -        fb->capa = fb->initial_length;
                -    }
                -
                -    for (required = fb->capa; requested > required - fb->len; required <<= 1);
                +    rb_io_write(fb->io, rb_utf8_str_new(fb->ptr, fb->len));
                +    fbuffer_clear(fb);
                +}
                @@ -106,0 +102,2 @@
                +static void fbuffer_realloc(FBuffer *fb, unsigned long required)
                +{
                @@ -119,0 +117,26 @@
                +static void fbuffer_do_inc_capa(FBuffer *fb, unsigned long requested)
                +{
                +    if (RB_UNLIKELY(fb->io)) {
                +        if (fb->capa < FBUFFER_IO_BUFFER_SIZE) {
                +            fbuffer_realloc(fb, FBUFFER_IO_BUFFER_SIZE);
                +        } else {
                +            fbuffer_flush(fb);
                +        }
                +
                +        if (RB_LIKELY(requested < fb->capa)) {
                +            return;
                +        }
                +    }
                +
                +    unsigned long required;
                +
                +    if (RB_UNLIKELY(!fb->ptr)) {
                +        fb->ptr = ALLOC_N(char, fb->initial_length);
                +        fb->capa = fb->initial_length;
                +    }
                +
                +    for (required = fb->capa; requested > required - fb->len; required <<= 1);
                +
                +    fbuffer_realloc(fb, required);
                +}
                +
                @@ -177 +200 @@
                -static VALUE fbuffer_to_s(FBuffer *fb)
                +static VALUE fbuffer_finalize(FBuffer *fb)
                @@ -179,3 +202,10 @@
                -    VALUE result = rb_utf8_str_new(FBUFFER_PTR(fb), FBUFFER_LEN(fb));
                -    fbuffer_free(fb);
                -    return result;
                +    if (fb->io) {
                +        fbuffer_flush(fb);
                +        fbuffer_free(fb);
                +        rb_io_flush(fb->io);
                +        return fb->io;
                +    } else {
                +        VALUE result = rb_utf8_str_new(FBUFFER_PTR(fb), FBUFFER_LEN(fb));
                +        fbuffer_free(fb);
                +        return result;
                +    }
        ext/json/ext/generator/generator.c
                --- /tmp/d20241204-1957-270ev5/json-2.8.2/ext/json/ext/generator/generator.c	2024-12-04 03:06:20.669355329 +0000
                +++ /tmp/d20241204-1957-270ev5/json-2.9.0/ext/json/ext/generator/generator.c	2024-12-04 03:06:20.677355504 +0000
                @@ -57 +57 @@
                -static VALUE cState_partial_generate(VALUE self, VALUE obj, generator_func);
                +static VALUE cState_partial_generate(VALUE self, VALUE obj, generator_func, VALUE io);
                @@ -73,0 +74,25 @@
                +#ifdef RBIMPL_ATTR_NORETURN
                +RBIMPL_ATTR_NORETURN()
                +#endif
                +static void raise_generator_error_str(VALUE invalid_object, VALUE str)
                +{
                +    VALUE exc = rb_exc_new_str(eGeneratorError, str);
                +    rb_ivar_set(exc, rb_intern("@invalid_object"), invalid_object);
                +    rb_exc_raise(exc);
                +}
                +
                +#ifdef RBIMPL_ATTR_NORETURN
                +RBIMPL_ATTR_NORETURN()
                +#endif
                +#ifdef RBIMPL_ATTR_FORMAT
                +RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 3)
                +#endif
                +static void raise_generator_error(VALUE invalid_object, const char *fmt, ...)
                +{
                +    va_list args;
                +    va_start(args, fmt);
                +    VALUE str = rb_vsprintf(fmt, args);
                +    va_end(args);
                +    raise_generator_error_str(invalid_object, str);
                +}
                +
                @@ -133 +158 @@
                -                    if (RB_UNLIKELY(out_script_safe && b2 == 0x80)) {
                +                    if (RB_UNLIKELY(out_script_safe && ch == 0xE2 && b2 == 0x80)) {
                @@ -456 +481 @@
                -    return cState_partial_generate(Vstate, self, generate_json_object);
                +    return cState_partial_generate(Vstate, self, generate_json_object, Qfalse);
                @@ -470 +495 @@
                -    return cState_partial_generate(Vstate, self, generate_json_array);
                +    return cState_partial_generate(Vstate, self, generate_json_array, Qfalse);
                @@ -483 +508 @@
                -    return cState_partial_generate(Vstate, self, generate_json_integer);
                +    return cState_partial_generate(Vstate, self, generate_json_integer, Qfalse);
                @@ -496 +521 @@
                -    return cState_partial_generate(Vstate, self, generate_json_fixnum);
                +    return cState_partial_generate(Vstate, self, generate_json_fixnum, Qfalse);
                @@ -508 +533 @@
                -    return cState_partial_generate(Vstate, self, generate_json_bignum);
                +    return cState_partial_generate(Vstate, self, generate_json_bignum, Qfalse);
                @@ -521 +546 @@
                -    return cState_partial_generate(Vstate, self, generate_json_float);
                +    return cState_partial_generate(Vstate, self, generate_json_float, Qfalse);
                @@ -546 +571 @@
                -    return cState_partial_generate(Vstate, self, generate_json_string);
                +    return cState_partial_generate(Vstate, self, generate_json_string, Qfalse);
                @@ -641 +666 @@
                -    return cState_partial_generate(state, string, generate_json_string);
                +    return cState_partial_generate(state, string, generate_json_string, Qfalse);
                @@ -869,0 +895,11 @@
                +static VALUE encode_json_string_try(VALUE str)
                +{
                +    return rb_funcall(str, i_encode, 1, Encoding_UTF_8);
                +}
                +
                +static VALUE encode_json_string_rescue(VALUE str, VALUE exception)
                +{
                +    raise_generator_error_str(str, rb_funcall(exception, rb_intern("message"), 0));
                +    return Qundef;
                +}
                +
                @@ -889 +925 @@
                -        str = rb_funcall(str, i_encode, 1, Encoding_UTF_8);
                +        str = rb_rescue(encode_json_string_try, str, encode_json_string_rescue, str);
                @@ -912 +948 @@
                -            rb_raise(rb_path2class("JSON::GeneratorError"), "source sequence is illegal/malformed utf-8");
                +            raise_generator_error(obj, "source sequence is illegal/malformed utf-8");
                @@ -960,4 +996,2 @@
                -        if (isinf(value)) {
                -            rb_raise(eGeneratorError, "%"PRIsVALUE" not allowed in JSON", tmp);
                -        } else if (isnan(value)) {
                -            rb_raise(eGeneratorError, "%"PRIsVALUE" not allowed in JSON", tmp);
                +        if (isinf(value) || isnan(value)) {
                +            raise_generator_error(obj, "%"PRIsVALUE" not allowed in JSON", tmp);
                @@ -1011 +1045 @@
                -                    rb_raise(eGeneratorError, "%"PRIsVALUE" not allowed in JSON", CLASS_OF(obj));
                +                    raise_generator_error(obj, "%"PRIsVALUE" not allowed in JSON", CLASS_OF(obj));
                @@ -1039,4 +1072,0 @@
                -    if (RBASIC_CLASS(exc) == rb_path2class("Encoding::UndefinedConversionError")) {
                -        exc = rb_exc_new_str(eGeneratorError, rb_funcall(exc, rb_intern("message"), 0));
                -    }
                -
                @@ -1048 +1078 @@
                -static VALUE cState_partial_generate(VALUE self, VALUE obj, generator_func func)
                +static VALUE cState_partial_generate(VALUE self, VALUE obj, generator_func func, VALUE io)
                @@ -1053 +1083,3 @@
                -    FBuffer buffer = {0};
                +    FBuffer buffer = {
                +        .io = RTEST(io) ? io : Qfalse,
                +    };
                @@ -1065 +1097 @@
                -    return fbuffer_to_s(&buffer);
                +    return fbuffer_finalize(&buffer);
                @@ -1068,8 +1100 @@
                -/*
                - * call-seq: generate(obj)
                - *
                - * Generates a valid JSON document from object +obj+ and returns the
                - * result. If no valid JSON document can be created this method raises a
                - * GeneratorError exception.
                - */
                -static VALUE cState_generate(VALUE self, VALUE obj)
                +static VALUE cState_generate(VALUE self, VALUE obj, VALUE io)
                @@ -1077 +1102 @@
                -    VALUE result = cState_partial_generate(self, obj, generate_json);
                +    VALUE result = cState_partial_generate(self, obj, generate_json, io);
                @@ -1505 +1530 @@
                -static VALUE cState_m_generate(VALUE klass, VALUE obj, VALUE opts)
                +static VALUE cState_m_generate(VALUE klass, VALUE obj, VALUE opts, VALUE io)
                @@ -1512 +1537,3 @@
                -    FBuffer buffer = {0};
                +    FBuffer buffer = {
                +        .io = RTEST(io) ? io : Qfalse,
                +    };
                @@ -1524 +1551 @@
                -    return fbuffer_to_s(&buffer);
                +    return fbuffer_finalize(&buffer);
                @@ -1542,0 +1570 @@
                +    rb_global_variable(&eGeneratorError);
                @@ -1543,0 +1572,2 @@
                +
                +    rb_global_variable(&eNestingError);
                @@ -1545,2 +1574,0 @@
                -    rb_gc_register_mark_object(eGeneratorError);
                -    rb_gc_register_mark_object(eNestingError);
                @@ -1586 +1614 @@
                -    rb_define_method(cState, "generate", cState_generate, 1);
                +    rb_define_private_method(cState, "_generate", cState_generate, 2);
                @@ -1588 +1616 @@
                -    rb_define_singleton_method(cState, "generate", cState_m_generate, 2);
                +    rb_define_singleton_method(cState, "generate", cState_m_generate, 3);
        ext/json/ext/parser/extconf.rb
                --- /tmp/d20241204-1957-270ev5/json-2.8.2/ext/json/ext/parser/extconf.rb	2024-12-04 03:06:20.669355329 +0000
                +++ /tmp/d20241204-1957-270ev5/json-2.9.0/ext/json/ext/parser/extconf.rb	2024-12-04 03:06:20.677355504 +0000
                @@ -6 +5,0 @@
                -have_func("rb_gc_mark_locations", "ruby.h") # Missing on TruffleRuby
        ext/json/ext/parser/parser.c
                --- /tmp/d20241204-1957-270ev5/json-2.8.2/ext/json/ext/parser/parser.c	2024-12-04 03:06:20.669355329 +0000
                +++ /tmp/d20241204-1957-270ev5/json-2.9.0/ext/json/ext/parser/parser.c	2024-12-04 03:06:20.677355504 +0000
                @@ -31,13 +30,0 @@
                -#ifndef HAVE_RB_GC_MARK_LOCATIONS
                -// For TruffleRuby
                -void rb_gc_mark_locations(const VALUE *start, const VALUE *end)
                -{
                -    VALUE *value = start;
                -
                -    while (value < end) {
                -        rb_gc_mark(*value);
                -        value++;
                -    }
                -}
                -#endif
                -
                @@ -269 +256,4 @@
                -    rb_gc_mark_locations(stack->ptr, stack->ptr + stack->head);
                +    long index;
                +    for (index = 0; index < stack->head; index++) {
                +        rb_gc_mark(stack->ptr[index]);
                +    }
                @@ -452 +442 @@
                -#line 475 "parser.rl"
                +#line 465 "parser.rl"
                @@ -456 +446 @@
                -#line 457 "parser.c"
                +#line 447 "parser.c"
                @@ -464 +454 @@
                -#line 515 "parser.rl"
                +#line 505 "parser.rl"
                @@ -480 +470 @@
                -#line 481 "parser.c"
                +#line 471 "parser.c"
                @@ -485 +475 @@
                -#line 530 "parser.rl"
                +#line 520 "parser.rl"
                @@ -487 +477 @@
                -#line 488 "parser.c"
                +#line 478 "parser.c"
                @@ -516 +506 @@
                -#line 494 "parser.rl"
                +#line 484 "parser.rl"
                @@ -532 +522 @@
                -#line 533 "parser.c"
                +#line 523 "parser.c"
                @@ -599 +589 @@
                -#line 483 "parser.rl"
                +#line 473 "parser.rl"
                @@ -613 +603 @@
                -#line 614 "parser.c"
                +#line 604 "parser.c"
                @@ -620 +610 @@
                -#line 492 "parser.rl"
                +#line 482 "parser.rl"
                @@ -626 +616 @@
                -#line 492 "parser.rl"
                +#line 482 "parser.rl"
                @@ -634 +624 @@
                -#line 492 "parser.rl"
                +#line 482 "parser.rl"
                @@ -641 +631 @@
                -#line 492 "parser.rl"
                +#line 482 "parser.rl"
                @@ -647 +637 @@
                -#line 492 "parser.rl"
                +#line 482 "parser.rl"
                @@ -653 +643 @@
                -#line 492 "parser.rl"
                +#line 482 "parser.rl"
                @@ -674 +664 @@
                -#line 505 "parser.rl"
                +#line 495 "parser.rl"
                @@ -681 +671 @@
                -#line 682 "parser.c"
                +#line 672 "parser.c"
                @@ -783 +773 @@
                -#line 492 "parser.rl"
                +#line 482 "parser.rl"
                @@ -789 +779 @@
                -#line 492 "parser.rl"
                +#line 482 "parser.rl"
                @@ -808 +798 @@
                -#line 492 "parser.rl"
                +#line 482 "parser.rl"
                @@ -815 +805 @@
                -#line 492 "parser.rl"
                +#line 482 "parser.rl"
                @@ -821 +811 @@
                -#line 492 "parser.rl"
                +#line 482 "parser.rl"
                @@ -844 +834 @@
                -#line 492 "parser.rl"
                +#line 482 "parser.rl"
                @@ -850 +840 @@
                -#line 492 "parser.rl"
                +#line 482 "parser.rl"
                @@ -858 +848 @@
                -#line 492 "parser.rl"
                +#line 482 "parser.rl"
                @@ -864 +854 @@
                -#line 492 "parser.rl"
                +#line 482 "parser.rl"
                @@ -870 +860 @@
                -#line 492 "parser.rl"
                +#line 482 "parser.rl"
                @@ -894 +884 @@
                -#line 492 "parser.rl"
                +#line 482 "parser.rl"
                @@ -901 +891 @@
                -#line 492 "parser.rl"
                +#line 482 "parser.rl"
                @@ -907 +897 @@
                -#line 492 "parser.rl"
                +#line 482 "parser.rl"
                @@ -1021 +1011 @@
                -#line 531 "parser.rl"
                +#line 521 "parser.rl"
                @@ -1072 +1062 @@
                -#line 1073 "parser.c"
                +#line 1063 "parser.c"
                @@ -1080 +1070 @@
                -#line 664 "parser.rl"
                +#line 654 "parser.rl"
                @@ -1088 +1078 @@
                -#line 1089 "parser.c"
                +#line 1079 "parser.c"
                @@ -1093 +1083 @@
                -#line 671 "parser.rl"
                +#line 661 "parser.rl"
                @@ -1095 +1085 @@
                -#line 1096 "parser.c"
                +#line 1086 "parser.c"
                @@ -1129 +1119 @@
                -#line 609 "parser.rl"
                +#line 599 "parser.rl"
                @@ -1141 +1131 @@
                -#line 619 "parser.rl"
                +#line 609 "parser.rl"
                @@ -1161 +1151 @@
                -#line 637 "parser.rl"
                +#line 627 "parser.rl"
                @@ -1171 +1161 @@
                -#line 645 "parser.rl"
                +#line 635 "parser.rl"
                @@ -1179 +1169 @@
                -#line 602 "parser.rl"
                +#line 592 "parser.rl"
                @@ -1189 +1179 @@
                -#line 595 "parser.rl"
                +#line 585 "parser.rl"
                @@ -1199 +1189 @@
                -#line 589 "parser.rl"
                +#line 579 "parser.rl"
                @@ -1205 +1195 @@
                -#line 586 "parser.rl"
                +#line 576 "parser.rl"
                @@ -1211 +1201 @@
                -#line 592 "parser.rl"
                +#line 582 "parser.rl"
                @@ -1220 +1210 @@
                -#line 651 "parser.rl"
                +#line 641 "parser.rl"
                @@ -1222 +1212 @@
                -#line 1223 "parser.c"
                +#line 1213 "parser.c"
                @@ -1463 +1453 @@
                -#line 672 "parser.rl"
                +#line 662 "parser.rl"
                @@ -1478 +1468 @@
                -#line 1479 "parser.c"
                +#line 1469 "parser.c"
                @@ -1486 +1476 @@
                -#line 693 "parser.rl"
                +#line 683 "parser.rl"
                @@ -1526 +1516 @@
                -#line 1527 "parser.c"
                +#line 1517 "parser.c"
                @@ -1534 +1524 @@
                -#line 745 "parser.rl"
                +#line 735 "parser.rl"
                @@ -1543 +1533 @@
                -#line 1544 "parser.c"
                +#line 1534 "parser.c"
                @@ -1548 +1538 @@
                -#line 753 "parser.rl"
                +#line 743 "parser.rl"
                @@ -1551 +1541 @@
                -#line 1552 "parser.c"
                +#line 1542 "parser.c"
                @@ -1591 +1581 @@
                -#line 737 "parser.rl"
                +#line 727 "parser.rl"
                @@ -1598 +1588 @@
                -#line 1599 "parser.c"
                +#line 1589 "parser.c"
                @@ -1601 +1591 @@
                -#line 738 "parser.rl"
                +#line 728 "parser.rl"
                @@ -1608 +1598 @@
                -#line 1609 "parser.c"
                +#line 1599 "parser.c"
                @@ -1627 +1617 @@
                -#line 738 "parser.rl"
                +#line 728 "parser.rl"
                @@ -1634 +1624 @@
                -#line 1635 "parser.c"
                +#line 1625 "parser.c"
                @@ -1691 +1681 @@
                -#line 755 "parser.rl"
                +#line 745 "parser.rl"
                @@ -1747 +1737 @@
                -#line 1748 "parser.c"
                +#line 1738 "parser.c"
                @@ -1755 +1745 @@
                -#line 835 "parser.rl"
                +#line 825 "parser.rl"
                @@ -1768 +1758 @@
                -#line 1769 "parser.c"
                +#line 1759 "parser.c"
                @@ -1773 +1763 @@
                -#line 847 "parser.rl"
                +#line 837 "parser.rl"
                @@ -1775 +1765 @@
                -#line 1776 "parser.c"
                +#line 1766 "parser.c"
                @@ -1815 +1805 @@
                -#line 815 "parser.rl"
                +#line 805 "parser.rl"
                @@ -1830 +1820 @@
                -#line 1831 "parser.c"
                +#line 1821 "parser.c"
                @@ -1835 +1825 @@
                -#line 825 "parser.rl"
                +#line 815 "parser.rl"
                @@ -1882 +1872 @@
                -#line 827 "parser.rl"
                +#line 817 "parser.rl"
                @@ -1889 +1879 @@
                -#line 1890 "parser.c"
                +#line 1880 "parser.c"
                @@ -1957 +1947 @@
                -#line 825 "parser.rl"
                +#line 815 "parser.rl"
                @@ -1963 +1953 @@
                -#line 825 "parser.rl"
                +#line 815 "parser.rl"
                @@ -1971 +1961 @@
                -#line 825 "parser.rl"
                +#line 815 "parser.rl"
                @@ -1977 +1967 @@
                -#line 825 "parser.rl"
                +#line 815 "parser.rl"
                @@ -1983 +1973 @@
                -#line 825 "parser.rl"
                +#line 815 "parser.rl"
                @@ -2022 +2012 @@
                -#line 825 "parser.rl"
                +#line 815 "parser.rl"
                @@ -2028 +2018 @@
                -#line 825 "parser.rl"
                +#line 815 "parser.rl"
                @@ -2047 +2037 @@
                -#line 825 "parser.rl"
                +#line 815 "parser.rl"
                @@ -2054 +2044 @@
                -#line 825 "parser.rl"
                +#line 815 "parser.rl"
                @@ -2060 +2050 @@
                -#line 825 "parser.rl"
                +#line 815 "parser.rl"
                @@ -2083 +2073 @@
                -#line 825 "parser.rl"
                +#line 815 "parser.rl"
                @@ -2089 +2079 @@
                -#line 825 "parser.rl"
                +#line 815 "parser.rl"
                @@ -2097 +2087 @@
                -#line 825 "parser.rl"
                +#line 815 "parser.rl"
                @@ -2103 +2093 @@
                -#line 825 "parser.rl"
                +#line 815 "parser.rl"
                @@ -2109 +2099 @@
                -#line 825 "parser.rl"
                +#line 815 "parser.rl"
                @@ -2133 +2123 @@
                -#line 825 "parser.rl"
                +#line 815 "parser.rl"
                @@ -2140 +2130 @@
                -#line 825 "parser.rl"
                +#line 815 "parser.rl"
                @@ -2146 +2136 @@
                -#line 825 "parser.rl"
                +#line 815 "parser.rl"
                @@ -2218 +2208 @@
                -#line 848 "parser.rl"
                +#line 838 "parser.rl"
                @@ -2412 +2402 @@
                -#line 2413 "parser.c"
                +#line 2403 "parser.c"
                @@ -2420 +2410 @@
                -#line 1071 "parser.rl"
                +#line 1061 "parser.rl"
                @@ -2441 +2431 @@
                -#line 2442 "parser.c"
                +#line 2432 "parser.c"
                @@ -2446 +2436 @@
                -#line 1091 "parser.rl"
                +#line 1081 "parser.rl"
                @@ -2449 +2439 @@
                -#line 2450 "parser.c"
                +#line 2440 "parser.c"
                @@ -2474 +2464 @@
                -#line 1053 "parser.rl"
                +#line 1043 "parser.rl"
                @@ -2481 +2471 @@
                -#line 1046 "parser.rl"
                +#line 1036 "parser.rl"
                @@ -2490 +2480 @@
                -#line 1046 "parser.rl"
                +#line 1036 "parser.rl"
                @@ -2502 +2492 @@
                -#line 2503 "parser.c"
                +#line 2493 "parser.c"
                @@ -2590 +2580 @@
                -#line 1093 "parser.rl"
                +#line 1083 "parser.rl"
                @@ -2743 +2733 @@
                -#line 2744 "parser.c"
                +#line 2734 "parser.c"
                @@ -2751 +2741 @@
                -#line 1259 "parser.rl"
                +#line 1249 "parser.rl"
                @@ -2780 +2770 @@
                -#line 2781 "parser.c"
                +#line 2771 "parser.c"
                @@ -2785 +2775 @@
                -#line 1287 "parser.rl"
                +#line 1277 "parser.rl"
                @@ -2789 +2779 @@
                -#line 2790 "parser.c"
                +#line 2780 "parser.c"
                @@ -2823 +2813 @@
                -#line 1251 "parser.rl"
                +#line 1241 "parser.rl"
                @@ -2833 +2823 @@
                -#line 2834 "parser.c"
                +#line 2824 "parser.c"
                @@ -2922 +2912 @@
                -#line 1290 "parser.rl"
                +#line 1280 "parser.rl"
                @@ -2958 +2948 @@
                -#line 2959 "parser.c"
                +#line 2949 "parser.c"
                @@ -2963 +2953 @@
                -#line 1325 "parser.rl"
                +#line 1315 "parser.rl"
                @@ -2967 +2957 @@
                -#line 2968 "parser.c"
                +#line 2958 "parser.c"
                @@ -3001 +2991 @@
                -#line 1251 "parser.rl"
                +#line 1241 "parser.rl"
                @@ -3011 +3001 @@
                -#line 3012 "parser.c"
                +#line 3002 "parser.c"
                @@ -3100 +3090 @@
                -#line 1328 "parser.rl"
                +#line 1318 "parser.rl"
                @@ -3125,2 +3115,4 @@
                -    const VALUE *name_cache_entries = &json->name_cache.entries[0];
                -    rb_gc_mark_locations(name_cache_entries, name_cache_entries + json->name_cache.length);
                +    long index;
                +    for (index = 0; index < json->name_cache.length; index++) {
                +        rb_gc_mark(json->name_cache.entries[index]);
                +    }
        ext/json/ext/parser/parser.rl
                --- /tmp/d20241204-1957-270ev5/json-2.8.2/ext/json/ext/parser/parser.rl	2024-12-04 03:06:20.669355329 +0000
                +++ /tmp/d20241204-1957-270ev5/json-2.9.0/ext/json/ext/parser/parser.rl	2024-12-04 03:06:20.677355504 +0000
                @@ -29,13 +28,0 @@
                -#ifndef HAVE_RB_GC_MARK_LOCATIONS
                -// For TruffleRuby
                -void rb_gc_mark_locations(const VALUE *start, const VALUE *end)
                -{
                -    VALUE *value = start;
                -
                -    while (value < end) {
                -        rb_gc_mark(*value);
                -        value++;
                -    }
                -}
                -#endif
                -
                @@ -267 +254,4 @@
                -    rb_gc_mark_locations(stack->ptr, stack->ptr + stack->head);
                +    long index;
                +    for (index = 0; index < stack->head; index++) {
                +        rb_gc_mark(stack->ptr[index]);
                +    }
                @@ -1352,2 +1342,4 @@
                -    const VALUE *name_cache_entries = &json->name_cache.entries[0];
                -    rb_gc_mark_locations(name_cache_entries, name_cache_entries + json->name_cache.length);
                +    long index;
                +    for (index = 0; index < json->name_cache.length; index++) {
                +        rb_gc_mark(json->name_cache.entries[index]);
                +    }
        lib/json/common.rb
                --- /tmp/d20241204-1957-270ev5/json-2.8.2/lib/json/common.rb	2024-12-04 03:06:20.673355416 +0000
                +++ /tmp/d20241204-1957-270ev5/json-2.9.0/lib/json/common.rb	2024-12-04 03:06:20.681355591 +0000
                @@ -146 +146,17 @@
                -  class GeneratorError < JSONError; end
                +  class GeneratorError < JSONError
                +    attr_reader :invalid_object
                +
                +    def initialize(message, invalid_object = nil)
                +      super(message)
                +      @invalid_object = invalid_object
                +    end
                +
                +    def detailed_message(...)
                +      if @invalid_object.nil?
                +        super
                +      else
                +        "#{super}\nInvalid object: #{@invalid_object.inspect}"
                +      end
                +    end
                +  end
                +
                @@ -289 +305 @@
                -      State.generate(obj, opts)
                +      State.generate(obj, opts, nil)
                @@ -413,0 +430,4 @@
                +  # BEWARE: This method is meant to serialise data from trusted user input,
                +  # like from your own database server or clients under your control, it could
                +  # be dangerous to allow untrusted users to pass JSON sources into it.
                +  #
                @@ -428,3 +447,0 @@
                -  #   BEWARE: This method is meant to serialise data from trusted user input,
                -  #   like from your own database server or clients under your control, it could
                -  #   be dangerous to allow untrusted users to pass JSON sources into it.
                @@ -566,0 +584,10 @@
                +  # BEWARE: This method is meant to serialise data from trusted user input,
                +  # like from your own database server or clients under your control, it could
                +  # be dangerous to allow untrusted users to pass JSON sources into it.
                +  # If you must use it, use JSON.unsafe_load instead to make it clear.
                +  #
                +  # Since JSON version 2.8.0, `load` emits a deprecation warning when a
                +  # non native type is deserialized, without `create_additions` being explicitly
                +  # enabled, and in JSON version 3.0, `load` will have `create_additions` disabled
                +  # by default.
                +  #
                @@ -581,4 +607,0 @@
                -  #   BEWARE: This method is meant to serialise data from trusted user input,
                -  #   like from your own database server or clients under your control, it could
                -  #   be dangerous to allow untrusted users to pass JSON sources into it.
                -  #   If you must use it, use JSON.unsafe_load instead to make it clear.
                @@ -797,2 +820,6 @@
                -    result = begin
                -      generate(obj, opts)
                +    begin
                +      if State === opts
                +        opts.generate(obj, anIO)
                +      else
                +        State.generate(obj, opts, anIO)
                +      end
                @@ -801,7 +827,0 @@
                -    end
                -
                -    if anIO.nil?
                -      result
                -    else
                -      anIO.write result
                -      anIO
        lib/json/ext/generator/state.rb
                --- /tmp/d20241204-1957-270ev5/json-2.8.2/lib/json/ext/generator/state.rb	2024-12-04 03:06:20.673355416 +0000
                +++ /tmp/d20241204-1957-270ev5/json-2.9.0/lib/json/ext/generator/state.rb	2024-12-04 03:06:20.681355591 +0000
                @@ -49,0 +50,11 @@
                +        # call-seq:
                +        #   generate(obj) -> String
                +        #   generate(obj, anIO) -> anIO
                +        #
                +        # Generates a valid JSON document from object +obj+ and returns the
                +        # result. If no valid JSON document can be created this method raises a
                +        # GeneratorError exception.
                +        def generate(obj, io = nil)
                +          _generate(obj, io)
                +        end
                +
        lib/json/truffle_ruby/generator.rb
                --- /tmp/d20241204-1957-270ev5/json-2.8.2/lib/json/truffle_ruby/generator.rb	2024-12-04 03:06:20.673355416 +0000
                +++ /tmp/d20241204-1957-270ev5/json-2.9.0/lib/json/truffle_ruby/generator.rb	2024-12-04 03:06:20.681355591 +0000
                @@ -65,2 +65,2 @@
                -      def utf8_to_json_ascii(string, script_safe = false) # :nodoc:
                -        string = string.b
                +      def utf8_to_json_ascii(original_string, script_safe = false) # :nodoc:
                +        string = original_string.b
                @@ -77 +77 @@
                -          c.size == 1 and raise GeneratorError, "invalid utf8 byte: '#{c}'"
                +          c.size == 1 and raise GeneratorError.new("invalid utf8 byte: '#{c}'", original_string)
                @@ -86 +86 @@
                -        raise GeneratorError.wrap(e)
                +        raise GeneratorError.new(e.message, original_string)
                @@ -99,2 +99,8 @@
                -        def self.generate(obj, opts = nil)
                -          new(opts).generate(obj)
                +        def self.generate(obj, opts = nil, io = nil)
                +          string = new(opts).generate(obj)
                +          if io
                +            io.write(string)
                +            io
                +          else
                +            string
                +          end
                @@ -303,2 +309,4 @@
                -          JSON::TruffleRuby::Generator.valid_utf8?(result) or raise GeneratorError,
                -            "source sequence #{result.inspect} is illegal/malformed utf-8"
                +          JSON::TruffleRuby::Generator.valid_utf8?(result) or raise GeneratorError.new(
                +            "source sequence #{result.inspect} is illegal/malformed utf-8",
                +            obj
                +          )
                @@ -361 +369 @@
                -              raise GeneratorError, error.message
                +              raise GeneratorError.new(error.message, string)
                @@ -364 +372 @@
                -          raise GeneratorError, "source sequence is illegal/malformed utf-8" unless string.valid_encoding?
                +          raise GeneratorError.new("source sequence is illegal/malformed utf-8", string) unless string.valid_encoding?
                @@ -400 +408 @@
                -              raise GeneratorError, "#{self.class} not allowed in JSON"
                +              raise GeneratorError.new("#{self.class} not allowed in JSON", self)
                @@ -451 +459 @@
                -                raise GeneratorError, "#{value.class} not allowed in JSON"
                +                raise GeneratorError.new("#{value.class} not allowed in JSON", value)
                @@ -504 +512 @@
                -                raise GeneratorError, "#{value.class} not allowed in JSON"
                +                raise GeneratorError.new("#{value.class} not allowed in JSON", value)
                @@ -533 +541 @@
                -                raise GeneratorError, "#{self} not allowed in JSON"
                +                raise GeneratorError.new("#{self} not allowed in JSON", self)
                @@ -539 +547 @@
                -                raise GeneratorError, "#{self} not allowed in JSON"
                +                raise GeneratorError.new("#{self} not allowed in JSON", self)
                @@ -555 +563 @@
                -                raise GeneratorError, "source sequence is illegal/malformed utf-8"
                +                raise GeneratorError.new("source sequence is illegal/malformed utf-8", self)
                @@ -567 +575 @@
                -            raise ::JSON::GeneratorError, error.message
                +            raise ::JSON::GeneratorError.new(error.message, self)
        lib/json/version.rb
                --- /tmp/d20241204-1957-270ev5/json-2.8.2/lib/json/version.rb	2024-12-04 03:06:20.673355416 +0000
                +++ /tmp/d20241204-1957-270ev5/json-2.9.0/lib/json/version.rb	2024-12-04 03:06:20.681355591 +0000
                @@ -4 +4 @@
                -  VERSION = '2.8.2'
                +  VERSION = '2.9.0'

Copy link

github-actions bot commented Dec 4, 2024

gem compare rubocop 1.69.0 1.69.1

Compared versions: ["1.69.0", "1.69.1"]
  DIFFERENT date:
    1.69.0: 2024-11-26 00:00:00 UTC
    1.69.1: 2024-12-03 00:00:00 UTC
  DIFFERENT metadata:
    1.69.0: {"homepage_uri"=>"https://rubocop.org/", "changelog_uri"=>"https://github.com/rubocop/rubocop/releases/tag/v1.69.0", "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.69.1: {"homepage_uri"=>"https://rubocop.org/", "changelog_uri"=>"https://github.com/rubocop/rubocop/releases/tag/v1.69.1", "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"}
  DIFFERENT rubygems_version:
    1.69.0: 3.4.22
    1.69.1: 3.3.7
  DIFFERENT version:
    1.69.0: 1.69.0
    1.69.1: 1.69.1
  DIFFERENT files:
    1.69.0->1.69.1:
      * Changed:
            lib/rubocop/cop/generator.rb +6/-0
            lib/rubocop/cop/internal_affairs/location_line_equality_comparison.rb +1/-0
            lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb +1/-2
            lib/rubocop/cop/lint/circular_argument_reference.rb +4/-0
            lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb +1/-0
            lib/rubocop/cop/lint/literal_as_condition.rb +1/-0
            lib/rubocop/cop/lint/non_deterministic_require_order.rb +3/-3
            lib/rubocop/cop/lint/refinement_import_methods.rb +1/-1
            lib/rubocop/cop/lint/unescaped_bracket_in_regexp.rb +3/-0
            lib/rubocop/cop/lint/unreachable_code.rb +51/-2
            lib/rubocop/cop/lint/useless_else_without_rescue.rb +4/-0
            lib/rubocop/cop/metrics/utils/code_length_calculator.rb +1/-1
            lib/rubocop/cop/naming/accessor_method_name.rb +6/-6
            lib/rubocop/cop/security/compound_hash.rb +1/-0
            lib/rubocop/cop/security/yaml_load.rb +3/-2
            lib/rubocop/cop/style/access_modifier_declarations.rb +1/-1
            lib/rubocop/cop/style/block_delimiters.rb +9/-1
            lib/rubocop/cop/style/dig_chain.rb +5/-6
            lib/rubocop/cop/style/fetch_env_var.rb +1/-0
            lib/rubocop/cop/style/hash_except.rb +19/-7
            lib/rubocop/cop/style/lambda_call.rb +3/-1
            lib/rubocop/cop/style/object_then.rb +1/-0
            lib/rubocop/cop/style/redundant_argument.rb +3/-1
            lib/rubocop/cop/style/redundant_parentheses.rb +1/-1
            lib/rubocop/cop/style/redundant_self.rb +1/-1
            lib/rubocop/cop/style/string_concatenation.rb +13/-11
            lib/rubocop/version.rb +1/-1
  DIFFERENT runtime dependencies:
    1.69.0->1.69.1:
      * Updated:
            regexp_parser from: [">= 2.4", "< 3.0"] to: [">= 2.9.3", "< 3.0"]
            rubocop-ast from: [">= 1.36.1", "< 2.0"] to: [">= 1.36.2", "< 2.0"]

Copy link

github-actions bot commented Dec 4, 2024

gem compare --diff rubocop 1.69.0 1.69.1

Compared versions: ["1.69.0", "1.69.1"]
  DIFFERENT files:
    1.69.0->1.69.1:
      * Changed:
        lib/rubocop/cop/generator.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/generator.rb	2024-12-04 03:06:46.105903600 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/generator.rb	2024-12-04 03:06:46.361909159 +0000
                @@ -73,0 +74,5 @@
                +                # Called on every `send` node (method call) while walking the AST.
                +                # TODO: remove this method if inspecting `send` nodes is unneeded for your cop.
                +                # By default, this is aliased to `on_csend` as well to handle method calls
                +                # with safe navigation, remove the alias if this is unnecessary.
                +                # If kept, ensure your tests cover safe navigation as well!
                @@ -78,0 +84 @@
                +                alias on_csend on_send
        lib/rubocop/cop/internal_affairs/location_line_equality_comparison.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/internal_affairs/location_line_equality_comparison.rb	2024-12-04 03:06:46.105903600 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/internal_affairs/location_line_equality_comparison.rb	2024-12-04 03:06:46.365909245 +0000
                @@ -21,0 +22 @@
                +        RESTRICT_ON_SEND = [:==].freeze
        lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb	2024-12-04 03:06:46.149904556 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb	2024-12-04 03:06:46.381909593 +0000
                @@ -48 +48 @@
                -        MATH_OPERATORS = %i[- + * / ** << >>].to_set.freeze
                +        RESTRICT_ON_SEND = %i[== != === <=> =~ && || > >= < <= | ^].freeze
                @@ -52 +51,0 @@
                -          return if MATH_OPERATORS.include?(node.method_name)
        lib/rubocop/cop/lint/circular_argument_reference.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/lint/circular_argument_reference.rb	2024-12-04 03:06:46.149904556 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/lint/circular_argument_reference.rb	2024-12-04 03:06:46.381909593 +0000
                @@ -39,0 +40,2 @@
                +        extend TargetRubyVersion
                +
                @@ -40,0 +43,2 @@
                +
                +        maximum_target_ruby_version 2.6
        lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb	2024-12-04 03:06:46.149904556 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb	2024-12-04 03:06:46.381909593 +0000
                @@ -35,0 +36 @@
                +        RESTRICT_ON_SEND = %i[new digest].freeze
        lib/rubocop/cop/lint/literal_as_condition.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/lint/literal_as_condition.rb	2024-12-04 03:06:46.173905077 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/lint/literal_as_condition.rb	2024-12-04 03:06:46.389909767 +0000
                @@ -38,0 +39 @@
                +        RESTRICT_ON_SEND = [:!].freeze
        lib/rubocop/cop/lint/non_deterministic_require_order.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/lint/non_deterministic_require_order.rb	2024-12-04 03:06:46.177905164 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/lint/non_deterministic_require_order.rb	2024-12-04 03:06:46.409910201 +0000
                @@ -61,0 +62 @@
                +        extend TargetRubyVersion
                @@ -64,0 +66,2 @@
                +        maximum_target_ruby_version 2.7
                +
                @@ -66 +68,0 @@
                -          return if target_ruby_version >= 3.0
                @@ -78 +79,0 @@
                -          return if target_ruby_version >= 3.0
                @@ -90 +90,0 @@
                -          return if target_ruby_version >= 3.0
        lib/rubocop/cop/lint/refinement_import_methods.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/lint/refinement_import_methods.rb	2024-12-04 03:06:46.253906814 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/lint/refinement_import_methods.rb	2024-12-04 03:06:46.413910288 +0000
                @@ -9 +9 @@
                -      # It emulates deprecation warnings in Ruby 3.1.
                +      # It emulates deprecation warnings in Ruby 3.1. Functionality has been removed in Ruby 3.2.
        lib/rubocop/cop/lint/unescaped_bracket_in_regexp.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/lint/unescaped_bracket_in_regexp.rb	2024-12-04 03:06:46.257906901 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/lint/unescaped_bracket_in_regexp.rb	2024-12-04 03:06:46.417910375 +0000
                @@ -60,0 +61,3 @@
                +          rescue Regexp::Parser::ParserError
                +            # Upon encountering an invalid regular expression,
                +            # we aim to proceed and identify any remaining potential offenses.
        lib/rubocop/cop/lint/unreachable_code.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/lint/unreachable_code.rb	2024-12-04 03:06:46.257906901 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/lint/unreachable_code.rb	2024-12-04 03:06:46.417910375 +0000
                @@ -34,0 +35,16 @@
                +        def initialize(config = nil, options = nil)
                +          super
                +          @redefined = []
                +          @instance_eval_count = 0
                +        end
                +
                +        def on_block(node)
                +          @instance_eval_count += 1 if instance_eval_block?(node)
                +        end
                +
                +        alias on_numblock on_block
                +
                +        def after_block(node)
                +          @instance_eval_count -= 1 if instance_eval_block?(node)
                +        end
                +
                @@ -48,0 +65,4 @@
                +        def redefinable_flow_method?(method)
                +          %i[raise fail throw exit exit! abort].include? method
                +        end
                +
                @@ -55 +75 @@
                -             {:raise :fail :throw :exit :exit! :abort}
                +             #redefinable_flow_method?
                @@ -61 +81 @@
                -          return true if flow_command?(node)
                +          return report_on_flow_command?(node) if flow_command?(node)
                @@ -70,0 +91,2 @@
                +          when :def
                +            register_redefinition(node)
                @@ -89,0 +112,27 @@
                +        end
                +
                +        def register_redefinition(node)
                +          @redefined << node.method_name if redefinable_flow_method? node.method_name
                +          false
                +        end
                +
                +        def instance_eval_block?(node)
                +          node.block_type? && node.method?(:instance_eval)
                +        end
                +
                +        def report_on_flow_command?(node)
                +          return true unless node.send_type?
                +
                +          # By the contract of this function, this case means that
                +          # the method is called on `Kernel` in which case we
                +          # always want to report a warning.
                +          return true if node.receiver
                +
                +          # Inside an `instance_eval` we have no way to tell the
                +          # type of `self` just by looking at the AST, so we can't
                +          # tell if the give function that's called has been
                +          # redefined or not, so to avoid false positives, we silence
                +          # the warning.
                +          return false if @instance_eval_count.positive?
                +
                +          !@redefined.include? node.method_name
        lib/rubocop/cop/lint/useless_else_without_rescue.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/lint/useless_else_without_rescue.rb	2024-12-04 03:06:46.257906901 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/lint/useless_else_without_rescue.rb	2024-12-04 03:06:46.417910375 +0000
                @@ -27,0 +28,2 @@
                +        extend TargetRubyVersion
                +
                @@ -28,0 +31,2 @@
                +
                +        maximum_target_ruby_version 2.5
        lib/rubocop/cop/metrics/utils/code_length_calculator.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/metrics/utils/code_length_calculator.rb	2024-12-04 03:06:46.261906988 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/metrics/utils/code_length_calculator.rb	2024-12-04 03:06:46.421910462 +0000
                @@ -12 +12 @@
                -          FOLDABLE_TYPES = %i[array hash heredoc send csend].freeze
                +          FOLDABLE_TYPES = %i[array hash heredoc method_call].freeze
        lib/rubocop/cop/naming/accessor_method_name.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/naming/accessor_method_name.rb	2024-12-04 03:06:46.273907248 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/naming/accessor_method_name.rb	2024-12-04 03:06:46.429910635 +0000
                @@ -6,2 +6,2 @@
                -      # Makes sure that accessor methods are named properly. Applies
                -      # to both instance and class methods.
                +      # Avoid prefixing accessor method names with `get_` or `set_`.
                +      # Applies to both instance and class methods.
                @@ -9,4 +9,4 @@
                -      # NOTE: Offenses are only registered for methods with the expected
                -      # arity. Getters (`get_attribute`) must have no arguments to be
                -      # registered, and setters (`set_attribute(value)`) must have exactly
                -      # one.
                +      # NOTE: Method names starting with `get_` or `set_` only register an offense
                +      # when the methods match the expected arity for getters and setters respectively.
                +      # Getters (`get_attribute`) must have no arguments to be registered,
                +      # and setters (`set_attribute(value)`) must have exactly one.
        lib/rubocop/cop/security/compound_hash.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/security/compound_hash.rb	2024-12-04 03:06:46.273907248 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/security/compound_hash.rb	2024-12-04 03:06:46.433910722 +0000
                @@ -34,0 +35 @@
                +        RESTRICT_ON_SEND = %i[hash ^ + * |].freeze
        lib/rubocop/cop/security/yaml_load.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/security/yaml_load.rb	2024-12-04 03:06:46.277907335 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/security/yaml_load.rb	2024-12-04 03:06:46.433910722 +0000
                @@ -27,0 +28 @@
                +        extend TargetRubyVersion
                @@ -31,0 +33,2 @@
                +        maximum_target_ruby_version 3.0
                +
                @@ -38,2 +40,0 @@
                -          return if target_ruby_version >= 3.1
                -
        lib/rubocop/cop/style/access_modifier_declarations.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/style/access_modifier_declarations.rb	2024-12-04 03:06:46.277907335 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/style/access_modifier_declarations.rb	2024-12-04 03:06:46.433910722 +0000
                @@ -199 +199 @@
                -            !right_siblings_same_inline_method?(node)) ||
                +            !node.parent&.if_type? && !right_siblings_same_inline_method?(node)) ||
        lib/rubocop/cop/style/block_delimiters.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/style/block_delimiters.rb	2024-12-04 03:06:46.277907335 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/style/block_delimiters.rb	2024-12-04 03:06:46.437910808 +0000
                @@ -344,0 +345 @@
                +        # rubocop:disable Metrics/CyclomaticComplexity
                @@ -349,0 +351,5 @@
                +            # When a method has an argument which is another method with a block,
                +            # that block needs braces, otherwise a syntax error will be introduced
                +            # for subsequent arguments.
                +            # Additionally, even without additional arguments, changing `{...}` to
                +            # `do...end` will change the binding of the block to the outer method.
                @@ -350,0 +357 @@
                +            node.arguments.each { |argument| get_blocks(argument, &block) }
                @@ -354 +361 @@
                -            # which could change in meaning if do...end replaced {...}
                +            # which could change in meaning if `do...end` is replaced with `{...}`
                @@ -361,0 +369 @@
                +        # rubocop:enable Metrics/CyclomaticComplexity
        lib/rubocop/cop/style/dig_chain.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/style/dig_chain.rb	2024-12-04 03:06:46.281907422 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/style/dig_chain.rb	2024-12-04 03:06:46.441910895 +0000
                @@ -27 +26,0 @@
                -        include RangeHelp
                @@ -52 +51 @@
                -          end_pos = node.source_range.end_pos
                +          end_range = node.source_range.end
                @@ -54,2 +53,2 @@
                -          while dig?((node = node.receiver))
                -            begin_pos = node.loc.dot ? node.loc.dot.begin_pos + 1 : 0
                +          while dig?(node = node.receiver)
                +            begin_range = node.loc.selector
                @@ -60 +59 @@
                -          return unless begin_pos
                +          return unless begin_range
                @@ -62 +61 @@
                -          [range_between(begin_pos, end_pos), arguments]
                +          [begin_range.join(end_range), arguments]
        lib/rubocop/cop/style/fetch_env_var.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/style/fetch_env_var.rb	2024-12-04 03:06:46.285907509 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/style/fetch_env_var.rb	2024-12-04 03:06:46.445910982 +0000
                @@ -28,0 +29 @@
                +        RESTRICT_ON_SEND = [:[]].freeze
        lib/rubocop/cop/style/hash_except.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/style/hash_except.rb	2024-12-04 03:06:46.289907596 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/style/hash_except.rb	2024-12-04 03:06:46.449911069 +0000
                @@ -25,0 +26,3 @@
                +      #   {foo: 1, bar: 2, baz: 3}.reject {|k, v| k.eql?(:bar) }
                +      #
                +      #   # bad
                @@ -29,0 +33,8 @@
                +      #   # bad
                +      #   {foo: 1, bar: 2, baz: 3}.reject {|k, v| !%i[bar].exclude?(k) }
                +      #   {foo: 1, bar: 2, baz: 3}.select {|k, v| %i[bar].exclude?(k) }
                +      #
                +      #   # bad
                +      #   {foo: 1, bar: 2, baz: 3}.reject {|k, v| k.in?(%i[bar]) }
                +      #   {foo: 1, bar: 2, baz: 3}.select {|k, v| !k.in?(%i[bar]) }
                +      #
                @@ -76 +86,0 @@
                -          method_name = node.method_name
                @@ -78 +88 @@
                -          return unless bad_method?(method_name, block) && semantically_except_method?(node, block)
                +          return unless bad_method?(block) && semantically_except_method?(node, block)
                @@ -95 +105 @@
                -        def bad_method?(method_name, block)
                +        def bad_method?(block)
                @@ -107,2 +116,0 @@
                -              return false if method_name == :reject && block.body.method?(:!)
                -
                @@ -132 +140,5 @@
                -          body.method?('include?') || body.method?('in?') || (negated && body.method?('exclude?'))
                +          if negated
                +            body.method?('exclude?')
                +          else
                +            body.method?('include?') || body.method?('in?')
                +          end
                @@ -136 +148 @@
                -          body.method?('exclude?') || (negated && (body.method?('include?') || body.method?('in?')))
                +          included?(!negated, body)
        lib/rubocop/cop/style/lambda_call.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/style/lambda_call.rb	2024-12-04 03:06:46.293907682 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/style/lambda_call.rb	2024-12-04 03:06:46.453911156 +0000
                @@ -46,0 +47 @@
                +        alias on_csend on_send
                @@ -56,0 +58 @@
                +          dot = node.loc.dot.source
                @@ -59 +61 @@
                -          "#{receiver}.#{method}"
                +          "#{receiver}#{dot}#{method}"
        lib/rubocop/cop/style/object_then.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/style/object_then.rb	2024-12-04 03:06:46.317908203 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/style/object_then.rb	2024-12-04 03:06:46.457911243 +0000
                @@ -32,0 +33 @@
                +        RESTRICT_ON_SEND = %i[then yield_self].freeze
        lib/rubocop/cop/style/redundant_argument.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/style/redundant_argument.rb	2024-12-04 03:06:46.321908290 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/style/redundant_argument.rb	2024-12-04 03:06:46.461911330 +0000
                @@ -121 +121,3 @@
                -          !target_argument.to_s.sub(/\A'/, '"').sub(/'\z/, '"').match?(/[[:cntrl:]]/) ||
                +          return true unless (target_argument_string = target_argument.to_s).valid_encoding?
                +
                +          !target_argument_string.sub(/\A'/, '"').sub(/'\z/, '"').match?(/[[:cntrl:]]/) ||
        lib/rubocop/cop/style/redundant_parentheses.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/style/redundant_parentheses.rb	2024-12-04 03:06:46.321908290 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/style/redundant_parentheses.rb	2024-12-04 03:06:46.465911416 +0000
                @@ -247 +247 @@
                -          args.one? && args.first.begin_type?
                +          args.one? && args.first&.begin_type?
        lib/rubocop/cop/style/redundant_self.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/style/redundant_self.rb	2024-12-04 03:06:46.325908377 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/style/redundant_self.rb	2024-12-04 03:06:46.465911416 +0000
                @@ -178 +178 @@
                -          else
                +          elsif node.respond_to?(:name)
        lib/rubocop/cop/style/string_concatenation.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/cop/style/string_concatenation.rb	2024-12-04 03:06:46.329908464 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/cop/style/string_concatenation.rb	2024-12-04 03:06:46.469911503 +0000
                @@ -145,11 +145,8 @@
                -          interpolated_parts =
                -            parts.map do |part|
                -              case part.type
                -              when :str
                -                value = part.value
                -                single_quoted?(part) ? value.gsub(/(\\|")/, '\\\\\&') : value.inspect[1..-2]
                -              when :dstr
                -                contents_range(part).source
                -              else
                -                "\#{#{part.source}}"
                -              end
                +          interpolated_parts = parts.map do |part|
                +            case part.type
                +            when :str
                +              adjust_str(part)
                +            when :dstr
                +              part.children.all?(&:str_type?) ? adjust_str(part) : contents_range(part).source
                +            else
                +              "\#{#{part.source}}"
                @@ -156,0 +154 @@
                +          end
                @@ -158,0 +157,4 @@
                +        end
                +
                +        def adjust_str(node)
                +          single_quoted?(node) ? node.value.gsub(/(\\|")/, '\\\\\&') : node.value.inspect[1..-2]
        lib/rubocop/version.rb
                --- /tmp/d20241204-5565-tnoh1z/rubocop-1.69.0/lib/rubocop/version.rb	2024-12-04 03:06:46.349908898 +0000
                +++ /tmp/d20241204-5565-tnoh1z/rubocop-1.69.1/lib/rubocop/version.rb	2024-12-04 03:06:46.505912285 +0000
                @@ -6 +6 @@
                -    STRING = '1.69.0'
                +    STRING = '1.69.1'

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