-
Notifications
You must be signed in to change notification settings - Fork 1
Bump rubocop from 1.79.2 to 1.81.7 #822
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.79.2 to 1.81.7. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](rubocop/rubocop@v1.79.2...v1.81.7) --- updated-dependencies: - dependency-name: rubocop dependency-version: 1.81.7 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Contributor
Contributor
gem compare json 2.13.2 2.15.2Compared versions: ["2.13.2", "2.15.2"]
DIFFERENT date:
2.13.2: 2025-07-28 00:00:00 UTC
2.15.2: 1980-01-02 00:00:00 UTC
DIFFERENT require_paths:
2.13.2: ["/opt/hostedtoolcache/Ruby/3.4.7/x64/lib/ruby/gems/3.4.0/extensions/x86_64-linux/3.4.0/json-2.13.2", "lib"]
2.15.2: ["/opt/hostedtoolcache/Ruby/3.4.7/x64/lib/ruby/gems/3.4.0/extensions/x86_64-linux/3.4.0/json-2.15.2", "lib"]
DIFFERENT rubygems_version:
2.13.2: 3.6.2
2.15.2: 3.6.9
DIFFERENT version:
2.13.2: 2.13.2
2.15.2: 2.15.2
DIFFERENT files:
2.13.2->2.15.2:
* Added:
lib/json/add/string.rb +35/-0
* Changed:
CHANGES.md +46/-8
README.md +3/-1
ext/json/ext/fbuffer/fbuffer.h +31/-5
ext/json/ext/generator/generator.c +134/-98
ext/json/ext/parser/parser.c +9/-4
ext/json/ext/vendor/fpconv.c +12/-11
lib/json.rb +23/-1
lib/json/add/core.rb +1/-0
lib/json/common.rb +32/-7
lib/json/ext/generator/state.rb +7/-14
lib/json/generic_object.rb +0/-8
lib/json/truffle_ruby/generator.rb +68/-46
lib/json/version.rb +1/-1
DIFFERENT extra_rdoc_files:
2.13.2->2.15.2:
* Changed:
README.md +3/-1 |
Contributor
gem compare --diff json 2.13.2 2.15.2Compared versions: ["2.13.2", "2.15.2"]
DIFFERENT files:
2.13.2->2.15.2:
* Added:
lib/json/add/string.rb
--- /tmp/20251103-2341-wqva0p 2025-11-03 03:01:47.118333617 +0000
+++ /tmp/d20251103-2341-tbjcgk/json-2.15.2/lib/json/add/string.rb 2025-11-03 03:01:47.116333622 +0000
@@ -0,0 +1,35 @@
+# frozen_string_literal: true
+unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
+ require 'json'
+end
+
+class String
+ # call-seq: json_create(o)
+ #
+ # Raw Strings are JSON Objects (the raw bytes are stored in an array for the
+ # key "raw"). The Ruby String can be created by this class method.
+ def self.json_create(object)
+ object["raw"].pack("C*")
+ end
+
+ # call-seq: to_json_raw_object()
+ #
+ # This method creates a raw object hash, that can be nested into
+ # other data structures and will be generated as a raw string. This
+ # method should be used, if you want to convert raw strings to JSON
+ # instead of UTF-8 strings, e. g. binary data.
+ def to_json_raw_object
+ {
+ JSON.create_id => self.class.name,
+ "raw" => unpack("C*"),
+ }
+ end
+
+ # call-seq: to_json_raw(*args)
+ #
+ # This method creates a JSON text from the result of a call to
+ # to_json_raw_object of this String.
+ def to_json_raw(...)
+ to_json_raw_object.to_json(...)
+ end
+end
* Changed:
CHANGES.md
--- /tmp/d20251103-2341-tbjcgk/json-2.13.2/CHANGES.md 2025-11-03 03:01:47.105333652 +0000
+++ /tmp/d20251103-2341-tbjcgk/json-2.15.2/CHANGES.md 2025-11-03 03:01:47.112333633 +0000
@@ -4,0 +5,37 @@
+### 2025-10-25 (2.15.2)
+
+* Fix `JSON::Coder` to have one dedicated depth counter per invocation.
+ After encountering a circular reference in `JSON::Coder#dump`, any further `#dump` call would raise `JSON::NestingError`.
+
+### 2025-10-07 (2.15.1)
+
+* Fix incorrect escaping in the JRuby extension when encoding shared strings.
+
+### 2025-09-22 (2.15.0)
+
+* `JSON::Coder` callback now receive a second argument to convey whether the object is a hash key.
+* Tuned the floating point number generator to not use scientific notation as aggressively.
+
+### 2025-09-18 (2.14.1)
+
+* Fix `IndexOutOfBoundsException` in the JRuby extension when encoding shared strings.
+
+### 2025-09-18 (2.14.0)
+
+* Add new `allow_duplicate_key` generator options. By default a warning is now emitted when a duplicated key is encountered.
+ In `json 3.0` an error will be raised.
+ ```ruby
+ >> Warning[:deprecated] = true
+ >> puts JSON.generate({ foo: 1, "foo" => 2 })
+ (irb):2: warning: detected duplicate key "foo" in {foo: 1, "foo" => 2}.
+ This will raise an error in json 3.0 unless enabled via `allow_duplicate_key: true`
+ {"foo":1,"foo":2}
+ >> JSON.generate({ foo: 1, "foo" => 2 }, allow_duplicate_key: false)
+ detected duplicate key "foo" in {foo: 1, "foo" => 2} (JSON::GeneratorError)
+ ```
+* Fix `JSON.generate` `strict: true` mode to also restrict hash keys.
+* Fix `JSON::Coder` to also invoke block for hash keys that aren't strings nor symbols.
+* Fix `JSON.unsafe_load` usage with proc
+* Fix the parser to more consistently reject invalid UTF-16 surogate pairs.
+* Stop defining `String.json_create`, `String#to_json_raw`, `String#to_json_raw_object` when `json/add` isn't loaded.
+
@@ -47 +84 @@
- These were deprecated 16 years ago, but never emited warnings, only undocumented, so are
+ These were deprecated 16 years ago, but never emitted warnings, only undocumented, so are
@@ -74 +111 @@
-* Raise a ParserError on all incomplete unicode escape sequence. This was the behavior until `2.10.0` unadvertently changed it.
+* Raise a ParserError on all incomplete unicode escape sequence. This was the behavior until `2.10.0` inadvertently changed it.
@@ -105 +142 @@
-* `JSON.load_file` explictly read the file as UTF-8.
+* `JSON.load_file` explicitly read the file as UTF-8.
@@ -113 +150 @@
-* Emit a deprecation warning when `JSON.load` create custom types without the `create_additions` option being explictly enabled.
+* Emit a deprecation warning when `JSON.load` create custom types without the `create_additions` option being explicitly enabled.
@@ -121 +158 @@
-* `JSON.pretty_generate` no longer include newline inside empty object and arrays.
+* `JSON.pretty_generate` no longer includes newlines inside empty object and arrays.
@@ -138 +175 @@
-* Make `json_pure` Ractor compatible.
+* Make `json_pure` Ractor compatible.
@@ -143,2 +180,2 @@
-* Limit the size of ParserError exception messages, only include up to 32 bytes of the unparseable source.
-* Fix json-pure's `Object#to_json` to accept non state arguments
+* Limit the size of ParserError exception messages, only include up to 32 bytes of the unparsable source.
+* Fix json-pure's `Object#to_json` to accept non-state arguments.
@@ -288,0 +326 @@
+ * Removed support for `quirks_mode` option.
README.md
--- /tmp/d20251103-2341-tbjcgk/json-2.13.2/README.md 2025-11-03 03:01:47.105333652 +0000
+++ /tmp/d20251103-2341-tbjcgk/json-2.15.2/README.md 2025-11-03 03:01:47.112333633 +0000
@@ -100 +100 @@
- API_JSON_CODER = JSON::Coder.new do |object|
+ API_JSON_CODER = JSON::Coder.new do |object, is_object_key|
@@ -114,0 +115,2 @@
+
+It is also called for objects that do have a JSON equivalent, but are used as Hash keys, for instance `{ 1 => 2}`.
ext/json/ext/fbuffer/fbuffer.h
--- /tmp/d20251103-2341-tbjcgk/json-2.13.2/ext/json/ext/fbuffer/fbuffer.h 2025-11-03 03:01:47.106333649 +0000
+++ /tmp/d20251103-2341-tbjcgk/json-2.15.2/ext/json/ext/fbuffer/fbuffer.h 2025-11-03 03:01:47.112333633 +0000
@@ -26,0 +27,8 @@
+#ifndef NOINLINE
+#if defined(__has_attribute) && __has_attribute(noinline)
+#define NOINLINE() __attribute__((noinline))
+#else
+#define NOINLINE()
+#endif
+#endif
+
@@ -172 +180,7 @@
-static void fbuffer_append(FBuffer *fb, const char *newstr, unsigned long len)
+static inline void fbuffer_append_reserved(FBuffer *fb, const char *newstr, unsigned long len)
+{
+ MEMCPY(fb->ptr + fb->len, newstr, char, len);
+ fbuffer_consumed(fb, len);
+}
+
+static inline void fbuffer_append(FBuffer *fb, const char *newstr, unsigned long len)
@@ -176,2 +190 @@
- MEMCPY(fb->ptr + fb->len, newstr, char, len);
- fbuffer_consumed(fb, len);
+ fbuffer_append_reserved(fb, newstr, len);
@@ -200,2 +212,0 @@
- RB_GC_GUARD(str);
-
@@ -202,0 +214,15 @@
+}
+
+static void fbuffer_append_str_repeat(FBuffer *fb, VALUE str, size_t repeat)
+{
+ const char *newstr = StringValuePtr(str);
+ unsigned long len = RSTRING_LEN(str);
+
+ fbuffer_inc_capa(fb, repeat * len);
+ while (repeat) {
+#ifdef JSON_DEBUG
+ fb->requested = len;
+#endif
+ fbuffer_append_reserved(fb, newstr, len);
+ repeat--;
+ }
ext/json/ext/generator/generator.c
--- /tmp/d20251103-2341-tbjcgk/json-2.13.2/ext/json/ext/generator/generator.c 2025-11-03 03:01:47.106333649 +0000
+++ /tmp/d20251103-2341-tbjcgk/json-2.15.2/ext/json/ext/generator/generator.c 2025-11-03 03:01:47.113333630 +0000
@@ -11,0 +12,6 @@
+enum duplicate_key_action {
+ JSON_DEPRECATED = 0,
+ JSON_IGNORE,
+ JSON_RAISE,
+};
+
@@ -23,0 +30,3 @@
+ enum duplicate_key_action on_duplicate_key;
+
+ bool as_json_single_arg;
@@ -34 +43 @@
-static VALUE mJSON, cState, cFragment, mString_Extend, eGeneratorError, eNestingError, Encoding_UTF_8;
+static VALUE mJSON, cState, cFragment, eGeneratorError, eNestingError, Encoding_UTF_8;
@@ -37 +46 @@
-static VALUE sym_indent, sym_space, sym_space_before, sym_object_nl, sym_array_nl, sym_max_nesting, sym_allow_nan,
+static VALUE sym_indent, sym_space, sym_space_before, sym_object_nl, sym_array_nl, sym_max_nesting, sym_allow_nan, sym_allow_duplicate_key,
@@ -140,2 +149,2 @@
- // For back-to-back characters that need to be escaped, specifcally for the SIMD code paths, this method
- // will be called just before calling escape_UTF8_char_basic. There will be no characers to append for the
+ // For back-to-back characters that need to be escaped, specifically for the SIMD code paths, this method
+ // will be called just before calling escape_UTF8_char_basic. There will be no characters to append for the
@@ -839,12 +847,0 @@
- * call-seq: String.included(modul)
- *
- * Extends _modul_ with the String::Extend module.
- */
-static VALUE mString_included_s(VALUE self, VALUE modul)
-{
- VALUE result = rb_funcall(modul, i_extend, 1, mString_Extend);
- rb_call_super(1, &modul);
- return result;
-}
-
-/*
@@ -865,45 +861,0 @@
- * call-seq: to_json_raw_object()
- *
- * This method creates a raw object hash, that can be nested into
- * other data structures and will be generated as a raw string. This
- * method should be used, if you want to convert raw strings to JSON
- * instead of UTF-8 strings, e. g. binary data.
- */
-static VALUE mString_to_json_raw_object(VALUE self)
-{
- VALUE ary;
- VALUE result = rb_hash_new();
- rb_hash_aset(result, rb_funcall(mJSON, i_create_id, 0), rb_class_name(rb_obj_class(self)));
- ary = rb_funcall(self, i_unpack, 1, rb_str_new2("C*"));
- rb_hash_aset(result, rb_utf8_str_new_lit("raw"), ary);
- return result;
-}
-
-/*
- * call-seq: to_json_raw(*args)
- *
- * This method creates a JSON text from the result of a call to
- * to_json_raw_object of this String.
- */
-static VALUE mString_to_json_raw(int argc, VALUE *argv, VALUE self)
-{
- VALUE obj = mString_to_json_raw_object(self);
- Check_Type(obj, T_HASH);
- return mHash_to_json(argc, argv, obj);
-}
-
-/*
- * call-seq: json_create(o)
- *
- * Raw Strings are JSON Objects (the raw bytes are stored in an array for the
- * key "raw"). The Ruby String can be created by this module method.
- */
-static VALUE mString_Extend_json_create(VALUE self, VALUE o)
-{
- VALUE ary;
- Check_Type(o, T_HASH);
- ary = rb_hash_aref(o, rb_str_new2("raw"));
- return rb_funcall(ary, i_pack, 1, rb_str_new2("C*"));
-}
-
-/*
@@ -1046,0 +999 @@
+ VALUE hash;
@@ -1048 +1001,3 @@
- int iter;
+ int first_key_type;
+ bool first;
+ bool mixed_keys_encountered;
@@ -1065,0 +1021,23 @@
+NOINLINE()
+static void
+json_inspect_hash_with_mixed_keys(struct hash_foreach_arg *arg)
+{
+ if (arg->mixed_keys_encountered) {
+ return;
+ }
+ arg->mixed_keys_encountered = true;
+
+ JSON_Generator_State *state = arg->data->state;
+ if (state->on_duplicate_key != JSON_IGNORE) {
+ VALUE do_raise = state->on_duplicate_key == JSON_RAISE ? Qtrue : Qfalse;
+ rb_funcall(mJSON, rb_intern("on_mixed_keys_hash"), 2, arg->hash, do_raise);
+ }
+}
+
+static VALUE
+json_call_as_json(JSON_Generator_State *state, VALUE object, VALUE is_key)
+{
+ VALUE proc_args[2] = {object, is_key};
+ return rb_proc_call_with_block(state->as_json, 2, proc_args, Qnil);
+}
+
@@ -1076 +1054,9 @@
- int j;
+ int key_type = rb_type(key);
+
+ if (arg->first) {
+ arg->first = false;
+ arg->first_key_type = key_type;
+ }
+ else {
+ fbuffer_append_char(buffer, ',');
+ }
@@ -1078 +1063,0 @@
- if (arg->iter > 0) fbuffer_append_char(buffer, ',');
@@ -1083,3 +1068 @@
- for (j = 0; j < depth; j++) {
- fbuffer_append_str(buffer, data->state->indent);
- }
+ fbuffer_append_str_repeat(buffer, data->state->indent, depth);
@@ -1089 +1072,4 @@
- switch (rb_type(key)) {
+ bool as_json_called = false;
+
+ start:
+ switch (key_type) {
@@ -1090,0 +1077,4 @@
+ if (RB_UNLIKELY(arg->first_key_type != T_STRING)) {
+ json_inspect_hash_with_mixed_keys(arg);
+ }
+
@@ -1097,0 +1088,4 @@
+ if (RB_UNLIKELY(arg->first_key_type != T_SYMBOL)) {
+ json_inspect_hash_with_mixed_keys(arg);
+ }
+
@@ -1100,0 +1095,10 @@
+ if (data->state->strict) {
+ if (RTEST(data->state->as_json) && !as_json_called) {
+ key = json_call_as_json(data->state, key, Qtrue);
+ key_type = rb_type(key);
+ as_json_called = true;
+ goto start;
+ } else {
+ raise_generator_error(key, "%"PRIsVALUE" not allowed as object key in JSON", CLASS_OF(key));
+ }
+ }
@@ -1115 +1118,0 @@
- arg->iter++;
@@ -1124 +1127 @@
- rb_raise(eNestingError, "nesting of %ld is too deep", --state->depth);
+ rb_raise(eNestingError, "nesting of %ld is too deep. Did you try to serialize objects with circular references?", --state->depth);
@@ -1131 +1133,0 @@
- int j;
@@ -1142,0 +1145 @@
+ .hash = obj,
@@ -1144 +1147 @@
- .iter = 0,
+ .first = true,
@@ -1152,3 +1155 @@
- for (j = 0; j < depth; j++) {
- fbuffer_append_str(buffer, data->state->indent);
- }
+ fbuffer_append_str_repeat(buffer, data->state->indent, depth);
@@ -1162 +1162,0 @@
- int i, j;
@@ -1173 +1173 @@
- for (i = 0; i < RARRAY_LEN(obj); i++) {
+ for (int i = 0; i < RARRAY_LEN(obj); i++) {
@@ -1179,3 +1179 @@
- for (j = 0; j < depth; j++) {
- fbuffer_append_str(buffer, data->state->indent);
- }
+ fbuffer_append_str_repeat(buffer, data->state->indent, depth);
@@ -1189,3 +1187 @@
- for (j = 0; j < depth; j++) {
- fbuffer_append_str(buffer, data->state->indent);
- }
+ fbuffer_append_str_repeat(buffer, data->state->indent, depth);
@@ -1343 +1339 @@
- VALUE casted_obj = rb_proc_call_with_block(data->state->as_json, 1, &obj, Qnil);
+ VALUE casted_obj = json_call_as_json(data->state, obj, Qfalse);
@@ -1360 +1356 @@
- * the 28 characters that fpconv_dtoa states as its maximum.
+ * the 32 characters that fpconv_dtoa states as its maximum.
@@ -1362 +1358 @@
- fbuffer_inc_capa(buffer, 28);
+ fbuffer_inc_capa(buffer, 32);
@@ -1365 +1360,0 @@
-
@@ -1432 +1427 @@
- obj = rb_proc_call_with_block(data->state->as_json, 1, &obj, Qnil);
+ obj = json_call_as_json(data->state, obj, Qfalse);
@@ -1499 +1494,9 @@
- VALUE result = cState_partial_generate(self, obj, generate_json, io);
+ return cState_partial_generate(self, obj, generate_json, io);
+}
+
+static VALUE cState_generate_new(int argc, VALUE *argv, VALUE self)
+{
+ rb_check_arity(argc, 1, 2);
+ VALUE obj = argv[0];
+ VALUE io = argc > 1 ? argv[1] : Qnil;
+
@@ -1501,2 +1504,23 @@
- (void)state;
- return result;
+
+ JSON_Generator_State new_state;
+ MEMCPY(&new_state, state, JSON_Generator_State, 1);
+
+ // FIXME: depth shouldn't be part of JSON_Generator_State, as that prevents it from being used concurrently.
+ new_state.depth = 0;
+
+ char stack_buffer[FBUFFER_STACK_SIZE];
+ FBuffer buffer = {
+ .io = RTEST(io) ? io : Qfalse,
+ };
+ fbuffer_stack_init(&buffer, state->buffer_initial_length, stack_buffer, FBUFFER_STACK_SIZE);
+
+ struct generate_json_data data = {
+ .buffer = &buffer,
+ .vstate = Qfalse,
+ .state = &new_state,
+ .obj = obj,
+ .func = generate_json
+ };
+ rb_rescue(generate_json_try, (VALUE)&data, generate_json_rescue, (VALUE)&data);
+
+ return fbuffer_finalize(&buffer);
@@ -1852,0 +1877,13 @@
+static VALUE cState_allow_duplicate_key_p(VALUE self)
+{
+ GET_STATE(self);
+ switch (state->on_duplicate_key) {
+ case JSON_IGNORE:
+ return Qtrue;
+ case JSON_DEPRECATED:
+ return Qnil;
+ default:
+ return Qfalse;
+ }
+}
+
@@ -1941,0 +1979 @@
+ else if (key == sym_allow_duplicate_key) { state->on_duplicate_key = RTEST(val) ? JSON_IGNORE : JSON_RAISE; }
@@ -1943,0 +1982 @@
+ state->as_json_single_arg = proc && rb_proc_arity(proc) == 1;
@@ -2065 +2104,3 @@
- rb_define_alias(cState, "generate_new", "generate"); // :nodoc:
+ rb_define_method(cState, "generate_new", cState_generate_new, -1); // :nodoc:
+
+ rb_define_private_method(cState, "allow_duplicate_key?", cState_allow_duplicate_key_p, 0);
@@ -2094 +2134,0 @@
- rb_define_singleton_method(mString, "included", mString_included_s, 1);
@@ -2096,5 +2135,0 @@
- rb_define_method(mString, "to_json_raw", mString_to_json_raw, -1);
- rb_define_method(mString, "to_json_raw_object", mString_to_json_raw_object, 0);
-
- mString_Extend = rb_define_module_under(mString, "Extend");
- rb_define_method(mString_Extend, "json_create", mString_Extend_json_create, 1);
@@ -2136,0 +2172 @@
+ sym_allow_duplicate_key = ID2SYM(rb_intern("allow_duplicate_key"));
ext/json/ext/parser/parser.c
--- /tmp/d20251103-2341-tbjcgk/json-2.13.2/ext/json/ext/parser/parser.c 2025-11-03 03:01:47.107333646 +0000
+++ /tmp/d20251103-2341-tbjcgk/json-2.15.2/ext/json/ext/parser/parser.c 2025-11-03 03:01:47.114333628 +0000
@@ -715,0 +716,5 @@
+
+ if ((sur & 0xFC00) != 0xDC00) {
+ raise_parse_error_at("invalid surrogate pair at %s", state, p);
+ }
+
@@ -720 +725 @@
- unescape = (char *) "?";
+ raise_parse_error_at("incomplete surrogate pair at %s", state, p);
@@ -978 +983 @@
- *state->cursor++;
+ state->cursor++;
@@ -1268 +1273 @@
- raise_parse_error("unreacheable: %s", state);
+ raise_parse_error("unreachable: %s", state);
@@ -1317 +1322 @@
- else if (key == sym_allow_duplicate_key) { config->on_duplicate_key = RTEST(val) ? JSON_IGNORE : JSON_RAISE; }
+ else if (key == sym_allow_duplicate_key) { config->on_duplicate_key = RTEST(val) ? JSON_IGNORE : JSON_RAISE; }
ext/json/ext/vendor/fpconv.c
--- /tmp/d20251103-2341-tbjcgk/json-2.13.2/ext/json/ext/vendor/fpconv.c 2025-11-03 03:01:47.107333646 +0000
+++ /tmp/d20251103-2341-tbjcgk/json-2.15.2/ext/json/ext/vendor/fpconv.c 2025-11-03 03:01:47.114333628 +0000
@@ -31,0 +32,4 @@
+#ifdef JSON_DEBUG
+#include <assert.h>
+#endif
+
@@ -323,9 +327 @@
- int max_trailing_zeros = 7;
-
- if(neg) {
- max_trailing_zeros -= 1;
- }
-
- /* write plain integer */
- if(K >= 0 && (exp < (ndigits + max_trailing_zeros))) {
-
+ if(K >= 0 && exp < 15) {
@@ -435,2 +431,2 @@
- * The generated string will never be longer than 28 characters.
- * Make sure to pass a pointer to at least 28 bytes of memory.
+ * The generated string will never be longer than 32 characters.
+ * Make sure to pass a pointer to at least 32 bytes of memory.
@@ -438,0 +435,2 @@
+ *
+ *
@@ -476,0 +475,3 @@
+#ifdef JSON_DEBUG
+ assert(str_len <= 32);
+#endif
lib/json.rb
--- /tmp/d20251103-2341-tbjcgk/json-2.13.2/lib/json.rb 2025-11-03 03:01:47.108333644 +0000
+++ /tmp/d20251103-2341-tbjcgk/json-2.15.2/lib/json.rb 2025-11-03 03:01:47.115333625 +0000
@@ -136 +136 @@
-# # waring: detected duplicate keys in JSON object.
+# # warning: detected duplicate keys in JSON object.
@@ -309,0 +310,19 @@
+# Option +allow_duplicate_key+ (boolean) specifies whether
+# hashes with duplicate keys should be allowed or produce an error.
+# defaults to emit a deprecation warning.
+#
+# With the default, (not set):
+# Warning[:deprecated] = true
+# JSON.generate({ foo: 1, "foo" => 2 })
+# # warning: detected duplicate key "foo" in {foo: 1, "foo" => 2}.
+# # This will raise an error in json 3.0 unless enabled via `allow_duplicate_key: true`
+# # => '{"foo":1,"foo":2}'
+#
+# With <tt>false</tt>
+# JSON.generate({ foo: 1, "foo" => 2 }, allow_duplicate_key: false)
+# # detected duplicate key "foo" in {foo: 1, "foo" => 2} (JSON::GeneratorError)
+#
+# In version 3.0, <tt>false</tt> will become the default.
+#
+# ---
+#
@@ -385,0 +405,3 @@
+#
+# Note that JSON Additions must only be used with trusted data, and is
+# deprecated.
lib/json/add/core.rb
--- /tmp/d20251103-2341-tbjcgk/json-2.13.2/lib/json/add/core.rb 2025-11-03 03:01:47.108333644 +0000
+++ /tmp/d20251103-2341-tbjcgk/json-2.15.2/lib/json/add/core.rb 2025-11-03 03:01:47.115333625 +0000
@@ -9,0 +10 @@
+require 'json/add/string'
lib/json/common.rb
--- /tmp/d20251103-2341-tbjcgk/json-2.13.2/lib/json/common.rb 2025-11-03 03:01:47.110333638 +0000
+++ /tmp/d20251103-2341-tbjcgk/json-2.15.2/lib/json/common.rb 2025-11-03 03:01:47.117333620 +0000
@@ -76 +76 @@
- if (klass.respond_to?(:json_creatable?) && klass.json_creatable?) || klass.respond_to?(:json_create)
+ if klass.respond_to?(:json_creatable?) ? klass.json_creatable? : klass.respond_to?(:json_create)
@@ -100 +100 @@
- gem_root = File.expand_path("../../../", __FILE__) + "/"
+ gem_root = File.expand_path("..", __dir__) + "/"
@@ -188,0 +189,19 @@
+ # Called from the extension when a hash has both string and symbol keys
+ def on_mixed_keys_hash(hash, do_raise)
+ set = {}
+ hash.each_key do |key|
+ key_str = key.to_s
+
+ if set[key_str]
+ message = "detected duplicate key #{key_str.inspect} in #{hash.inspect}"
+ if do_raise
+ raise GeneratorError, message
+ else
+ deprecation_warning("#{message}.\nThis will raise an error in json 3.0 unless enabled via `allow_duplicate_key: true`")
+ end
+ else
+ set[key_str] = true
+ end
+ end
+ end
+
@@ -394 +413 @@
- # See also JSON.fast_generate, JSON.pretty_generate.
+ # See also JSON.pretty_generate.
@@ -645,0 +665 @@
+ # obj
@@ -687,3 +707,7 @@
- result = parse(source, opts)
- recurse_proc(result, &proc) if proc
- result
+
+ if proc
+ opts = opts.dup
+ opts[:on_load] = proc.to_proc
+ end
+
+ parse(source, opts)
@@ -805,0 +830 @@
+ # obj
@@ -1005 +1030 @@
- # encoutered, the block provided to the initialize method is invoked, and must return a Ruby object that has a native
+ # encountered, the block provided to the initialize method is invoked, and must return a Ruby object that has a native
lib/json/ext/generator/state.rb
--- /tmp/d20251103-2341-tbjcgk/json-2.13.2/lib/json/ext/generator/state.rb 2025-11-03 03:01:47.110333638 +0000
+++ /tmp/d20251103-2341-tbjcgk/json-2.15.2/lib/json/ext/generator/state.rb 2025-11-03 03:01:47.117333620 +0000
@@ -11,14 +11,2 @@
- # _opts_ can have the following keys:
- #
- # * *indent*: a string used to indent levels (default: ''),
- # * *space*: a string that is put after, a : or , delimiter (default: ''),
- # * *space_before*: a string that is put before a : pair delimiter (default: ''),
- # * *object_nl*: a string that is put at the end of a JSON object (default: ''),
- # * *array_nl*: a string that is put at the end of a JSON array (default: ''),
- # * *allow_nan*: true if NaN, Infinity, and -Infinity should be
- # generated, otherwise an exception is thrown, if these values are
- # encountered. This options defaults to false.
- # * *ascii_only*: true if only ASCII characters should be generated. This
- # option defaults to false.
- # * *buffer_initial_length*: sets the initial length of the generator's
- # internal buffer.
+ # Argument +opts+, if given, contains a \Hash of options for the generation.
+ # See {Generating Options}[#module-JSON-label-Generating+Options].
@@ -69,0 +58,5 @@
+
+ allow_duplicate_key = allow_duplicate_key?
+ unless allow_duplicate_key.nil?
+ result[:allow_duplicate_key] = allow_duplicate_key
+ end
lib/json/generic_object.rb
--- /tmp/d20251103-2341-tbjcgk/json-2.13.2/lib/json/generic_object.rb 2025-11-03 03:01:47.111333636 +0000
+++ /tmp/d20251103-2341-tbjcgk/json-2.15.2/lib/json/generic_object.rb 2025-11-03 03:01:47.117333620 +0000
@@ -55,8 +54,0 @@
- def [](name)
- __send__(name)
- end unless method_defined?(:[])
-
- def []=(name, value)
- __send__("#{name}=", value)
- end unless method_defined?(:[]=)
-
lib/json/truffle_ruby/generator.rb
--- /tmp/d20251103-2341-tbjcgk/json-2.13.2/lib/json/truffle_ruby/generator.rb 2025-11-03 03:01:47.111333636 +0000
+++ /tmp/d20251103-2341-tbjcgk/json-2.15.2/lib/json/truffle_ruby/generator.rb 2025-11-03 03:01:47.118333617 +0000
@@ -49,0 +50,8 @@
+ def self.native_type?(value) # :nodoc:
+ (false == value || true == value || nil == value || String === value || Array === value || Hash === value || Integer === value || Float === value || Fragment === value)
+ end
+
+ def self.native_key?(key) # :nodoc:
+ (Symbol === key || String === key)
+ end
+
@@ -207 +215 @@
- raise NestingError, "nesting of #{current_nesting} is too deep"
+ raise NestingError, "nesting of #{current_nesting} is too deep. Did you try to serialize objects with circular references?"
@@ -273,0 +282,6 @@
+ if opts.key?(:allow_duplicate_key)
+ @allow_duplicate_key = !!opts[:allow_duplicate_key]
+ else
+ @allow_duplicate_key = nil # nil is deprecation
+ end
+
@@ -286,0 +301,4 @@
+ def allow_duplicate_key? # :nodoc:
+ @allow_duplicate_key
+ end
+
@@ -294,0 +313,5 @@
+
+ if result[:allow_duplicate_key].nil?
+ result.delete(:allow_duplicate_key)
+ end
+
@@ -326,0 +350,4 @@
+ private def initialize_copy(_orig)
+ @depth = 0
+ end
+
@@ -332,0 +360 @@
+ key_type = nil
@@ -334 +362,9 @@
- buf << ',' unless first
+ if first
+ key_type = k.class
+ else
+ if key_type && !@allow_duplicate_key && key_type != k.class
+ key_type = nil # stop checking
+ JSON.send(:on_mixed_keys_hash, obj, !@allow_duplicate_key.nil?)
+ end
+ buf << ','
+ end
@@ -427 +463 @@
- if state.strict? && !(false == value || true == value || nil == value || String === value || Array === value || Hash === value || Integer === value || Float === value || Fragment === value)
+ if state.strict? && !Generator.native_type?(value)
@@ -429,2 +465,2 @@
- value = state.as_json.call(value)
- unless false == value || true == value || nil == value || String === value || Array === value || Hash === value || Integer === value || Float === value || Fragment === value
+ value = state.as_json.call(value, false)
+ unless Generator.native_type?(value)
@@ -473,0 +510 @@
+ key_type = nil
@@ -476 +513,9 @@
- result << delim unless first
+ if first
+ key_type = key.class
+ else
+ if key_type && !state.allow_duplicate_key? && key_type != key.class
+ key_type = nil # stop checking
+ JSON.send(:on_mixed_keys_hash, self, state.allow_duplicate_key? == false)
+ end
+ result << delim
+ end
@@ -478,0 +524,10 @@
+ if state.strict? && !Generator.native_key?(key)
+ if state.as_json
+ key = state.as_json.call(key, true)
+ end
+
+ unless Generator.native_key?(key)
+ raise GeneratorError.new("#{key.class} not allowed as object key in JSON", value)
+ end
+ end
+
@@ -487 +542 @@
- if state.strict? && !(false == value || true == value || nil == value || String === value || Array === value || Hash === value || Integer === value || Float === value || Fragment === value)
+ if state.strict? && !Generator.native_type?(value)
@@ -489,2 +544,2 @@
- value = state.as_json.call(value)
- unless false == value || true == value || nil == value || String === value || Array === value || Hash === value || Integer === value || Float === value || Fragment === value
+ value = state.as_json.call(value, false)
+ unless Generator.native_type?(value)
@@ -548 +603 @@
- if state.strict? && !(false == value || true == value || nil == value || String === value || Array === value || Hash === value || Integer === value || Float === value || Fragment === value || Symbol == value)
+ if state.strict? && !Generator.native_type?(value)
@@ -550,2 +605,2 @@
- value = state.as_json.call(value)
- unless false == value || true == value || nil == value || String === value || Array === value || Hash === value || Integer === value || Float === value || Fragment === value || Symbol === value
+ value = state.as_json.call(value, false)
+ unless Generator.native_type?(value)
@@ -585 +640 @@
- casted_value = state.as_json.call(self)
+ casted_value = state.as_json.call(self, false)
@@ -637,33 +691,0 @@
- end
-
- # Module that holds the extending methods if, the String module is
- # included.
- module Extend
- # Raw Strings are JSON Objects (the raw bytes are stored in an
- # array for the key "raw"). The Ruby String can be created by this
- # module method.
- def json_create(o)
- o['raw'].pack('C*')
- end
- end
-
- # Extends _modul_ with the String::Extend module.
- def self.included(modul)
- modul.extend Extend
- end
-
- # This method creates a raw object hash, that can be nested into
- # other data structures and will be unparsed as a raw string. This
- # method should be used, if you want to convert raw strings to JSON
- # instead of UTF-8 strings, e. g. binary data.
- def to_json_raw_object
- {
- JSON.create_id => self.class.name,
- 'raw' => self.unpack('C*'),
- }
- end
-
- # This method creates a JSON text from the result of
- # a call to to_json_raw_object of this String.
- def to_json_raw(*args)
- to_json_raw_object.to_json(*args)
lib/json/version.rb
--- /tmp/d20251103-2341-tbjcgk/json-2.13.2/lib/json/version.rb 2025-11-03 03:01:47.111333636 +0000
+++ /tmp/d20251103-2341-tbjcgk/json-2.15.2/lib/json/version.rb 2025-11-03 03:01:47.118333617 +0000
@@ -4 +4 @@
- VERSION = '2.13.2'
+ VERSION = '2.15.2' |
Contributor
gem compare parser 3.3.9.0 3.3.10.0Compared versions: ["3.3.9.0", "3.3.10.0"]
DIFFERENT date:
3.3.9.0: 2025-07-25 00:00:00 UTC
3.3.10.0: 2025-10-27 00:00:00 UTC
DIFFERENT metadata:
3.3.9.0: {"bug_tracker_uri" => "https://github.com/whitequark/parser/issues", "changelog_uri" => "https://github.com/whitequark/parser/blob/v3.3.9.0/CHANGELOG.md", "documentation_uri" => "https://www.rubydoc.info/gems/parser/3.3.9.0", "source_code_uri" => "https://github.com/whitequark/parser/tree/v3.3.9.0"}
3.3.10.0: {"bug_tracker_uri" => "https://github.com/whitequark/parser/issues", "changelog_uri" => "https://github.com/whitequark/parser/blob/v3.3.10.0/CHANGELOG.md", "documentation_uri" => "https://www.rubydoc.info/gems/parser/3.3.10.0", "source_code_uri" => "https://github.com/whitequark/parser/tree/v3.3.10.0"}
DIFFERENT version:
3.3.9.0: 3.3.9.0
3.3.10.0: 3.3.10.0
DIFFERENT files:
3.3.9.0->3.3.10.0:
* Changed:
lib/parser/current.rb +1/-1
lib/parser/version.rb +1/-1 |
Contributor
gem compare --diff parser 3.3.9.0 3.3.10.0Compared versions: ["3.3.9.0", "3.3.10.0"]
DIFFERENT files:
3.3.9.0->3.3.10.0:
* Changed:
lib/parser/current.rb
--- /tmp/d20251103-2854-yryflb/parser-3.3.9.0/lib/parser/current.rb 2025-11-03 03:02:10.289277607 +0000
+++ /tmp/d20251103-2854-yryflb/parser-3.3.10.0/lib/parser/current.rb 2025-11-03 03:02:10.669276959 +0000
@@ -114 +114 @@
- current_version = '3.3.9'
+ current_version = '3.3.10'
lib/parser/version.rb
--- /tmp/d20251103-2854-yryflb/parser-3.3.9.0/lib/parser/version.rb 2025-11-03 03:02:10.666276964 +0000
+++ /tmp/d20251103-2854-yryflb/parser-3.3.10.0/lib/parser/version.rb 2025-11-03 03:02:10.705276897 +0000
@@ -4 +4 @@
- VERSION = '3.3.9.0'
+ VERSION = '3.3.10.0' |
Contributor
gem compare prism 1.4.0 1.6.0Compared versions: ["1.4.0", "1.6.0"]
DIFFERENT date:
1.4.0: 2025-03-18 00:00:00 UTC
1.6.0: 1980-01-02 00:00:00 UTC
DIFFERENT require_paths:
1.4.0: ["/opt/hostedtoolcache/Ruby/3.4.7/x64/lib/ruby/gems/3.4.0/extensions/x86_64-linux/3.4.0/prism-1.4.0", "lib"]
1.6.0: ["/opt/hostedtoolcache/Ruby/3.4.7/x64/lib/ruby/gems/3.4.0/extensions/x86_64-linux/3.4.0/prism-1.6.0", "lib"]
DIFFERENT rubygems_version:
1.4.0: 3.6.2
1.6.0: 3.6.9
DIFFERENT version:
1.4.0: 1.4.0
1.6.0: 1.6.0
DIFFERENT files:
1.4.0->1.6.0:
* Added:
lib/prism/polyfill/scan_byte.rb +14/-0
lib/prism/polyfill/warn.rb +36/-0
lib/prism/translation/parser_current.rb +24/-0
sig/prism/parse_result/comments.rbs +38/-0
* Changed:
CHANGELOG.md +51/-1
Makefile +4/-2
README.md +2/-0
config.yml +266/-38
docs/design.md +2/-2
docs/parser_translation.md +8/-23
docs/releasing.md +5/-24
docs/ripper_translation.md +1/-1
ext/prism/api_node.c +2/-0
ext/prism/extension.c +25/-3
ext/prism/extension.h +1/-1
include/prism.h +39/-14
include/prism/ast.h +306/-50
include/prism/diagnostic.h +5/-0
include/prism/options.h +43/-3
include/prism/regexp.h +2/-2
include/prism/util/pm_buffer.h +8/-0
include/prism/util/pm_integer.h +4/-0
include/prism/util/pm_list.h +6/-0
include/prism/util/pm_string.h +12/-2
include/prism/version.h +2/-2
lib/prism.rb +23/-0
lib/prism/compiler.rb +456/-151
lib/prism/desugar_compiler.rb +1/-0
lib/prism/dispatcher.rb +16/-0
lib/prism/dot_visitor.rb +5/-1
lib/prism/dsl.rb +3/-0
lib/prism/ffi.rb +25/-9
lib/prism/inspect_visitor.rb +3/-0
lib/prism/lex_compat.rb +1/-0
lib/prism/mutation_compiler.rb +3/-0
lib/prism/node.rb +507/-336
lib/prism/node_ext.rb +4/-1
lib/prism/pack.rb +2/-0
lib/prism/parse_result.rb +1/-0
lib/prism/parse_result/comments.rb +1/-0
lib/prism/parse_result/errors.rb +1/-0
lib/prism/parse_result/newlines.rb +1/-0
lib/prism/pattern.rb +1/-0
lib/prism/reflection.rb +3/-0
lib/prism/relocation.rb +1/-0
lib/prism/serialize.rb +25/-19
lib/prism/string_query.rb +1/-0
lib/prism/translation.rb +2/-0
lib/prism/translation/parser.rb +21/-2
lib/prism/translation/parser/builder.rb +1/-0
lib/prism/translation/parser/compiler.rb +47/-25
lib/prism/translation/parser/lexer.rb +29/-21
lib/prism/translation/parser33.rb +1/-0
lib/prism/translation/parser34.rb +1/-0
lib/prism/translation/parser35.rb +1/-0
lib/prism/translation/ripper.rb +17/-1
lib/prism/translation/ripper/sexp.rb +1/-0
lib/prism/translation/ruby_parser.rb +287/-4
lib/prism/visitor.rb +457/-152
prism.gemspec +5/-1
rbi/prism/dsl.rbi +3/-3
rbi/prism/node.rbi +21/-9
sig/prism.rbs +4/-0
sig/prism/dispatcher.rbs +3/-0
sig/prism/dsl.rbs +3/-3
sig/prism/node.rbs +444/-30
sig/prism/node_ext.rbs +84/-17
sig/prism/parse_result.rbs +4/-0
sig/prism/reflection.rbs +1/-1
src/diagnostic.c +9/-1
src/node.c +2/-0
src/options.c +2/-2
src/prettyprint.c +2/-0
src/prism.c +324/-147
src/serialize.c +2/-0
src/token_type.c +36/-34
src/util/pm_string.c +6/-8 |
Contributor
|
Contributor
gem compare regexp_parser 2.11.0 2.11.3Compared versions: ["2.11.0", "2.11.3"]
DIFFERENT date:
2.11.0: 2025-08-03 00:00:00 UTC
2.11.3: 1980-01-02 00:00:00 UTC
DIFFERENT rubygems_version:
2.11.0: 3.4.13
2.11.3: 3.6.7
DIFFERENT version:
2.11.0: 2.11.0
2.11.3: 2.11.3
DIFFERENT files:
2.11.0->2.11.3:
* Added:
lib/regexp_parser/syntax/versions/3.5.0.rb +4/-0
* Changed:
Gemfile +3/-1
Rakefile +5/-3
lib/regexp_parser.rb +2/-0
lib/regexp_parser/error.rb +2/-0
lib/regexp_parser/expression.rb +2/-0
lib/regexp_parser/expression/base.rb +2/-0
lib/regexp_parser/expression/classes/alternation.rb +2/-0
lib/regexp_parser/expression/classes/anchor.rb +2/-0
lib/regexp_parser/expression/classes/backreference.rb +2/-0
lib/regexp_parser/expression/classes/character_set.rb +2/-0
lib/regexp_parser/expression/classes/character_set/intersection.rb +2/-0
lib/regexp_parser/expression/classes/character_set/range.rb +2/-0
lib/regexp_parser/expression/classes/character_type.rb +2/-0
lib/regexp_parser/expression/classes/conditional.rb +2/-0
lib/regexp_parser/expression/classes/escape_sequence.rb +2/-0
lib/regexp_parser/expression/classes/free_space.rb +2/-0
lib/regexp_parser/expression/classes/group.rb +2/-0
lib/regexp_parser/expression/classes/keep.rb +2/-0
lib/regexp_parser/expression/classes/literal.rb +2/-0
lib/regexp_parser/expression/classes/posix_class.rb +2/-0
lib/regexp_parser/expression/classes/root.rb +2/-0
lib/regexp_parser/expression/classes/unicode_property.rb +2/-0
lib/regexp_parser/expression/methods/construct.rb +2/-0
lib/regexp_parser/expression/methods/escape_sequence_char.rb +2/-0
lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb +2/-0
lib/regexp_parser/expression/methods/human_name.rb +2/-0
lib/regexp_parser/expression/methods/match.rb +2/-0
lib/regexp_parser/expression/methods/match_length.rb +2/-0
lib/regexp_parser/expression/methods/negative.rb +2/-0
lib/regexp_parser/expression/methods/options.rb +2/-0
lib/regexp_parser/expression/methods/parts.rb +2/-0
lib/regexp_parser/expression/methods/printing.rb +2/-0
lib/regexp_parser/expression/methods/referenced_expressions.rb +2/-0
lib/regexp_parser/expression/methods/strfregexp.rb +2/-0
lib/regexp_parser/expression/methods/tests.rb +2/-0
lib/regexp_parser/expression/methods/traverse.rb +2/-0
lib/regexp_parser/expression/quantifier.rb +3/-1
lib/regexp_parser/expression/sequence.rb +2/-0
lib/regexp_parser/expression/sequence_operation.rb +2/-0
lib/regexp_parser/expression/shared.rb +6/-3
lib/regexp_parser/expression/subexpression.rb +2/-0
lib/regexp_parser/lexer.rb +2/-0
lib/regexp_parser/parser.rb +2/-0
lib/regexp_parser/scanner.rb +755/-654
lib/regexp_parser/scanner/errors/premature_end_error.rb +2/-0
lib/regexp_parser/scanner/errors/scanner_error.rb +2/-0
lib/regexp_parser/scanner/errors/validation_error.rb +2/-0
lib/regexp_parser/scanner/properties/long.csv +19/-0
lib/regexp_parser/scanner/properties/short.csv +8/-0
lib/regexp_parser/scanner/scanner.rl +16/-7
lib/regexp_parser/syntax.rb +2/-0
lib/regexp_parser/syntax/any.rb +2/-0
lib/regexp_parser/syntax/base.rb +2/-0
lib/regexp_parser/syntax/token.rb +5/-3
lib/regexp_parser/syntax/token/anchor.rb +5/-3
lib/regexp_parser/syntax/token/assertion.rb +4/-2
lib/regexp_parser/syntax/token/backreference.rb +8/-6
lib/regexp_parser/syntax/token/character_set.rb +3/-1
lib/regexp_parser/syntax/token/character_type.rb +6/-4
lib/regexp_parser/syntax/token/conditional.rb +5/-3
lib/regexp_parser/syntax/token/escape.rb +9/-7
lib/regexp_parser/syntax/token/group.rb +8/-6
lib/regexp_parser/syntax/token/keep.rb +3/-1
lib/regexp_parser/syntax/token/meta.rb +4/-2
lib/regexp_parser/syntax/token/posix_class.rb +4/-2
lib/regexp_parser/syntax/token/quantifier.rb +8/-6
lib/regexp_parser/syntax/token/unicode_property.rb +62/-47
lib/regexp_parser/syntax/token/virtual.rb +5/-3
lib/regexp_parser/syntax/version_lookup.rb +4/-2
lib/regexp_parser/syntax/versions.rb +2/-0
lib/regexp_parser/syntax/versions/1.8.6.rb +2/-0
lib/regexp_parser/syntax/versions/1.9.1.rb +2/-0
lib/regexp_parser/syntax/versions/1.9.3.rb +2/-0
lib/regexp_parser/syntax/versions/2.0.0.rb +2/-0
lib/regexp_parser/syntax/versions/2.2.0.rb +2/-0
lib/regexp_parser/syntax/versions/2.3.0.rb +2/-0
lib/regexp_parser/syntax/versions/2.4.0.rb +2/-0
lib/regexp_parser/syntax/versions/2.4.1.rb +2/-0
lib/regexp_parser/syntax/versions/2.5.0.rb +2/-0
lib/regexp_parser/syntax/versions/2.6.0.rb +2/-0
lib/regexp_parser/syntax/versions/2.6.2.rb +2/-0
lib/regexp_parser/syntax/versions/2.6.3.rb +2/-0
lib/regexp_parser/syntax/versions/3.1.0.rb +2/-0
lib/regexp_parser/syntax/versions/3.2.0.rb +2/-0
lib/regexp_parser/token.rb +2/-0
lib/regexp_parser/version.rb +3/-1
regexp_parser.gemspec +2/-0
2.11.0->2.11.3:
* Updated
rubocop from: ["~> 1.59"] to: [">= 1.80.2"] |
Contributor
|
Contributor
gem compare rubocop 1.79.2 1.81.7Compared versions: ["1.79.2", "1.81.7"]
DIFFERENT date:
1.79.2: 2025-08-05 00:00:00 UTC
1.81.7: 2025-10-31 00:00:00 UTC
DIFFERENT metadata:
1.79.2: {"homepage_uri" => "https://rubocop.org/", "changelog_uri" => "https://github.com/rubocop/rubocop/releases/tag/v1.79.2", "source_code_uri" => "https://github.com/rubocop/rubocop/", "documentation_uri" => "https://docs.rubocop.org/rubocop/1.79/", "bug_tracker_uri" => "https://github.com/rubocop/rubocop/issues", "rubygems_mfa_required" => "true"}
1.81.7: {"homepage_uri" => "https://rubocop.org/", "changelog_uri" => "https://github.com/rubocop/rubocop/releases/tag/v1.81.7", "source_code_uri" => "https://github.com/rubocop/rubocop/", "documentation_uri" => "https://docs.rubocop.org/rubocop/1.81/", "bug_tracker_uri" => "https://github.com/rubocop/rubocop/issues", "rubygems_mfa_required" => "true"}
DIFFERENT version:
1.79.2: 1.79.2
1.81.7: 1.81.7
DIFFERENT files:
1.79.2->1.81.7:
* Added:
lib/rubocop/cop/style/array_intersect_with_single_element.rb +47/-0
* Changed:
README.md +1/-1
config/default.yml +14/-2
exe/rubocop +1/-8
lib/rubocop.rb +1/-0
lib/rubocop/cli.rb +6/-2
lib/rubocop/cli/command/auto_generate_config.rb +2/-2
lib/rubocop/config_loader.rb +3/-1
lib/rubocop/config_loader_resolver.rb +5/-4
lib/rubocop/config_store.rb +5/-0
lib/rubocop/cop/autocorrect_logic.rb +4/-4
lib/rubocop/cop/correctors/alignment_corrector.rb +7/-4
lib/rubocop/cop/correctors/for_to_each_corrector.rb +7/-2
lib/rubocop/cop/internal_affairs/node_pattern_groups.rb +3/-1
lib/rubocop/cop/internal_affairs/on_send_without_on_csend.rb +1/-1
lib/rubocop/cop/layout/class_structure.rb +1/-1
lib/rubocop/cop/layout/dot_position.rb +1/-1
lib/rubocop/cop/layout/empty_line_between_defs.rb +30/-12
lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb +1/-1
lib/rubocop/cop/layout/hash_alignment.rb +2/-5
lib/rubocop/cop/layout/line_length.rb +9/-1
lib/rubocop/cop/layout/multiline_operation_indentation.rb +8/-4
lib/rubocop/cop/layout/rescue_ensure_alignment.rb +8/-0
lib/rubocop/cop/layout/trailing_whitespace.rb +1/-1
lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb +3/-2
lib/rubocop/cop/lint/cop_directive_syntax.rb +13/-7
lib/rubocop/cop/lint/debugger.rb +0/-2
lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb +4/-1
lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb +5/-42
lib/rubocop/cop/lint/empty_interpolation.rb +11/-0
lib/rubocop/cop/lint/missing_cop_enable_directive.rb +17/-8
lib/rubocop/cop/lint/rescue_exception.rb +1/-4
lib/rubocop/cop/lint/self_assignment.rb +6/-5
lib/rubocop/cop/lint/shadowed_argument.rb +7/-7
lib/rubocop/cop/lint/uri_escape_unescape.rb +2/-0
lib/rubocop/cop/lint/void.rb +7/-0
lib/rubocop/cop/message_annotator.rb +1/-1
lib/rubocop/cop/mixin/check_line_breakable.rb +1/-1
lib/rubocop/cop/mixin/end_keyword_alignment.rb +1/-7
lib/rubocop/cop/mixin/trailing_comma.rb +1/-1
lib/rubocop/cop/naming/method_name.rb +4/-2
lib/rubocop/cop/naming/predicate_method.rb +19/-6
lib/rubocop/cop/security/json_load.rb +33/-11
lib/rubocop/cop/style/array_intersect.rb +46/-12
lib/rubocop/cop/style/bitwise_predicate.rb +8/-1
lib/rubocop/cop/style/conditional_assignment.rb +7/-3
lib/rubocop/cop/style/constant_visibility.rb +14/-9
lib/rubocop/cop/style/double_negation.rb +1/-1
lib/rubocop/cop/style/endless_method.rb +15/-2
lib/rubocop/cop/style/explicit_block_argument.rb +1/-1
lib/rubocop/cop/style/float_division.rb +15/-1
lib/rubocop/cop/style/hash_syntax.rb +1/-1
lib/rubocop/cop/style/infinite_loop.rb +1/-1
lib/rubocop/cop/style/nil_comparison.rb +9/-7
lib/rubocop/cop/style/one_line_conditional.rb +17/-9
lib/rubocop/cop/style/redundant_begin.rb +34/-0
lib/rubocop/cop/style/redundant_condition.rb +1/-1
lib/rubocop/cop/style/redundant_exception.rb +1/-1
lib/rubocop/cop/style/redundant_format.rb +26/-5
lib/rubocop/cop/style/redundant_interpolation.rb +11/-2
lib/rubocop/cop/style/redundant_parentheses.rb +14/-11
lib/rubocop/cop/style/redundant_regexp_argument.rb +4/-0
lib/rubocop/cop/style/redundant_regexp_escape.rb +8/-0
lib/rubocop/cop/style/safe_navigation.rb +18/-1
lib/rubocop/cop/style/semicolon.rb +23/-7
lib/rubocop/cop/style/sole_nested_conditional.rb +8/-1
lib/rubocop/cop/style/string_concatenation.rb +17/-13
lib/rubocop/cop/style/symbol_array.rb +1/-1
lib/rubocop/cop/style/trailing_comma_in_arguments.rb +45/-0
lib/rubocop/cop/style/unless_else.rb +10/-9
lib/rubocop/cop/utils/format_string.rb +10/-0
lib/rubocop/cop/variable_force.rb +9/-7
lib/rubocop/cop/variable_force/variable.rb +1/-1
lib/rubocop/cops_documentation_generator.rb +4/-4
lib/rubocop/formatter/disabled_config_formatter.rb +18/-5
lib/rubocop/lsp/diagnostic.rb +21/-20
lib/rubocop/lsp/routes.rb +62/-6
lib/rubocop/lsp/runtime.rb +2/-2
lib/rubocop/lsp/server.rb +2/-2
lib/rubocop/lsp/stdin_runner.rb +0/-16
lib/rubocop/result_cache.rb +1/-1
lib/rubocop/runner.rb +6/-4
lib/rubocop/target_finder.rb +9/-9
lib/rubocop/target_ruby.rb +10/-1
lib/rubocop/version.rb +1/-1
lib/ruby_lsp/rubocop/addon.rb +23/-8
lib/ruby_lsp/rubocop/runtime_adapter.rb +49/-15
DIFFERENT extra_rdoc_files:
1.79.2->1.81.7:
* Changed:
README.md +1/-1
DIFFERENT runtime dependencies:
1.79.2->1.81.7:
* Updated:
rubocop-ast from: [">= 1.46.0", "< 2.0"] to: [">= 1.47.1", "< 2.0"] |
Contributor
|
Contributor
gem compare rubocop-ast 1.46.0 1.47.1Compared versions: ["1.46.0", "1.47.1"]
DIFFERENT date:
1.46.0: 2025-07-16 00:00:00 UTC
1.47.1: 2025-09-22 00:00:00 UTC
DIFFERENT version:
1.46.0: 1.46.0
1.47.1: 1.47.1
DIFFERENT files:
1.46.0->1.47.1:
* Changed:
README.md +0/-2
lib/rubocop/ast/node.rb +15/-0
lib/rubocop/ast/node/mixin/parameterized_node.rb +1/-0
lib/rubocop/ast/node_pattern.rb +1/-0
lib/rubocop/ast/node_pattern/compiler.rb +1/-0
lib/rubocop/ast/node_pattern/lexer.rex +1/-1
lib/rubocop/ast/node_pattern/lexer.rex.rb +1/-1
lib/rubocop/ast/traversal.rb +1/-0
lib/rubocop/ast/version.rb +1/-1
DIFFERENT extra_rdoc_files:
1.46.0->1.47.1:
* Changed:
README.md +0/-2 |
Contributor
gem compare --diff rubocop-ast 1.46.0 1.47.1Compared versions: ["1.46.0", "1.47.1"]
DIFFERENT files:
1.46.0->1.47.1:
* Changed:
README.md
--- /tmp/d20251103-12954-t2ebsa/rubocop-ast-1.46.0/README.md 2025-11-03 03:04:12.735970715 +0000
+++ /tmp/d20251103-12954-t2ebsa/rubocop-ast-1.47.1/README.md 2025-11-03 03:04:12.749970679 +0000
@@ -5,2 +4,0 @@
-[](https://codeclimate.com/github/rubocop/rubocop-ast/test_coverage)
-[](https://codeclimate.com/github/rubocop/rubocop-ast/maintainability)
lib/rubocop/ast/node.rb
--- /tmp/d20251103-12954-t2ebsa/rubocop-ast-1.46.0/lib/rubocop/ast/node.rb 2025-11-03 03:04:12.736970713 +0000
+++ /tmp/d20251103-12954-t2ebsa/rubocop-ast-1.47.1/lib/rubocop/ast/node.rb 2025-11-03 03:04:12.750970676 +0000
@@ -110,0 +111,7 @@
+ str: :any_str,
+ dstr: :any_str,
+ xstr: :any_str,
+
+ sym: :any_sym,
+ dsym: :any_sym,
+
@@ -547,0 +555,8 @@
+ end
+
+ def any_str_type?
+ GROUP_FOR_TYPE[type] == :any_str
+ end
+
+ def any_sym_type?
+ GROUP_FOR_TYPE[type] == :any_sym
lib/rubocop/ast/node/mixin/parameterized_node.rb
--- /tmp/d20251103-12954-t2ebsa/rubocop-ast-1.46.0/lib/rubocop/ast/node/mixin/parameterized_node.rb 2025-11-03 03:04:12.742970697 +0000
+++ /tmp/d20251103-12954-t2ebsa/rubocop-ast-1.47.1/lib/rubocop/ast/node/mixin/parameterized_node.rb 2025-11-03 03:04:12.756970661 +0000
@@ -67,0 +68 @@
+
lib/rubocop/ast/node_pattern.rb
--- /tmp/d20251103-12954-t2ebsa/rubocop-ast-1.46.0/lib/rubocop/ast/node_pattern.rb 2025-11-03 03:04:12.745970689 +0000
+++ /tmp/d20251103-12954-t2ebsa/rubocop-ast-1.47.1/lib/rubocop/ast/node_pattern.rb 2025-11-03 03:04:12.760970651 +0000
@@ -52,0 +53 @@
+
lib/rubocop/ast/node_pattern/compiler.rb
--- /tmp/d20251103-12954-t2ebsa/rubocop-ast-1.46.0/lib/rubocop/ast/node_pattern/compiler.rb 2025-11-03 03:04:12.746970687 +0000
+++ /tmp/d20251103-12954-t2ebsa/rubocop-ast-1.47.1/lib/rubocop/ast/node_pattern/compiler.rb 2025-11-03 03:04:12.760970651 +0000
@@ -12,0 +13 @@
+
lib/rubocop/ast/node_pattern/lexer.rex
--- /tmp/d20251103-12954-t2ebsa/rubocop-ast-1.46.0/lib/rubocop/ast/node_pattern/lexer.rex 2025-11-03 03:04:12.747970684 +0000
+++ /tmp/d20251103-12954-t2ebsa/rubocop-ast-1.47.1/lib/rubocop/ast/node_pattern/lexer.rex 2025-11-03 03:04:12.761970648 +0000
@@ -24 +24 @@
- /"(.+?)"/ { emit :tSTRING }
+ /"(.*?)"/ { emit :tSTRING }
lib/rubocop/ast/node_pattern/lexer.rex.rb
--- /tmp/d20251103-12954-t2ebsa/rubocop-ast-1.46.0/lib/rubocop/ast/node_pattern/lexer.rex.rb 2025-11-03 03:04:12.747970684 +0000
+++ /tmp/d20251103-12954-t2ebsa/rubocop-ast-1.47.1/lib/rubocop/ast/node_pattern/lexer.rex.rb 2025-11-03 03:04:12.761970648 +0000
@@ -125 +125 @@
- when ss.skip(/"(.+?)"/) then
+ when ss.skip(/"(.*?)"/) then
lib/rubocop/ast/traversal.rb
--- /tmp/d20251103-12954-t2ebsa/rubocop-ast-1.46.0/lib/rubocop/ast/traversal.rb 2025-11-03 03:04:12.749970679 +0000
+++ /tmp/d20251103-12954-t2ebsa/rubocop-ast-1.47.1/lib/rubocop/ast/traversal.rb 2025-11-03 03:04:12.763970643 +0000
@@ -81,0 +82 @@
+
lib/rubocop/ast/version.rb
--- /tmp/d20251103-12954-t2ebsa/rubocop-ast-1.46.0/lib/rubocop/ast/version.rb 2025-11-03 03:04:12.749970679 +0000
+++ /tmp/d20251103-12954-t2ebsa/rubocop-ast-1.47.1/lib/rubocop/ast/version.rb 2025-11-03 03:04:12.763970643 +0000
@@ -6 +6 @@
- STRING = '1.46.0'
+ STRING = '1.47.1' |
Contributor
gem compare unicode-display_width 3.1.4 3.2.0Compared versions: ["3.1.4", "3.2.0"]
DIFFERENT date:
3.1.4: 2025-01-13 00:00:00 UTC
3.2.0: 2025-09-09 00:00:00 UTC
DIFFERENT description:
3.1.4: [Unicode 16.0.0] Determines the monospace display width of a string using EastAsianWidth.txt, Unicode general category, Emoji specification, and other data.
3.2.0: [Unicode 17.0.0] Determines the monospace display width of a string using EastAsianWidth.txt, Unicode general category, Emoji specification, and other data.
DIFFERENT version:
3.1.4: 3.1.4
3.2.0: 3.2.0
DIFFERENT files:
3.1.4->3.2.0:
* Changed:
CHANGELOG.md +8/-0
README.md +5/-5
lib/unicode/display_width/constants.rb +2/-2
lib/unicode/display_width/emoji_support.rb +5/-2
DIFFERENT extra_rdoc_files:
3.1.4->3.2.0:
* Changed:
README.md +5/-5
CHANGELOG.md +8/-0
DIFFERENT runtime dependencies:
3.1.4->3.2.0:
* Updated:
unicode-emoji from: ["~> 4.0", ">= 4.0.4"] to: ["~> 4.1"] |
Contributor
gem compare --diff unicode-display_width 3.1.4 3.2.0Compared versions: ["3.1.4", "3.2.0"]
DIFFERENT files:
3.1.4->3.2.0:
* Changed:
CHANGELOG.md
--- /tmp/d20251103-13476-137fpl/unicode-display_width-3.1.4/CHANGELOG.md 2025-11-03 03:04:35.615911599 +0000
+++ /tmp/d20251103-13476-137fpl/unicode-display_width-3.2.0/CHANGELOG.md 2025-11-03 03:04:35.617911594 +0000
@@ -2,0 +3,8 @@
+## 3.2.0
+
+- Unicode 17.0
+
+## 3.1.5
+
+- Cache Emoji support level for performance reasons #30, patch by @Earlopain:
+
README.md
--- /tmp/d20251103-13476-137fpl/unicode-display_width-3.1.4/README.md 2025-11-03 03:04:35.616911597 +0000
+++ /tmp/d20251103-13476-137fpl/unicode-display_width-3.2.0/README.md 2025-11-03 03:04:35.618911592 +0000
@@ -3 +3 @@
-Determines the monospace display width of a string in Ruby, which is useful for all kinds of terminal-based applications. The implementation is based on [EastAsianWidth.txt](https://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt), the [Emoji specfication](https://www.unicode.org/reports/tr51/) and other data, 100% in Ruby. It does not rely on the OS vendor ([wcwidth()](https://github.com/janlelis/wcswidth-ruby)) to provide an up-to-date method for measuring string width in terminals.
+Determines the monospace display width of a string in Ruby, which is useful for all kinds of terminal-based applications. The implementation is based on [EastAsianWidth.txt](https://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt), the [Emoji specfication](https://www.unicode.org/reports/tr51/) and other data, 100% in Ruby. It does not rely on the OS vendor ([wcwidth](https://github.com/janlelis/wcswidth-ruby)) to provide an up-to-date method for measuring string width in terminals.
@@ -5 +5 @@
-Unicode version: **16.0.0** (September 2024)
+Unicode version: **17.0.0** (September 2025)
@@ -111,2 +111,2 @@
-Single Emoji character with Skin Tone Modifier | 2
-Skin Tone Modifier used in isolation or with invalid base | 2 if Emoji mode is configured to `:rgi` / `:rgi_at`
+Single Emoji character with Skin Tone Modifier | 2 unless Emoji mode is `:none` or `vs16`
+Skin Tone Modifier used in isolation or with invalid base | 2 if Emoji mode is `:rgi` / `:rgi_at`
@@ -191 +191 @@
-- Copyright (c) 2011, 2015-2024 Jan Lelis, https://janlelis.com, released under the MIT
+- Copyright (c) 2011, 2015-2025 Jan Lelis, https://janlelis.com, released under the MIT
data/display_width.marshal.gz
Binary files /tmp/d20251103-13476-137fpl/unicode-display_width-3.1.4/data/display_width.marshal.gz and /tmp/d20251103-13476-137fpl/unicode-display_width-3.2.0/data/display_width.marshal.gz differ
lib/unicode/display_width/constants.rb
--- /tmp/d20251103-13476-137fpl/unicode-display_width-3.1.4/lib/unicode/display_width/constants.rb 2025-11-03 03:04:35.616911597 +0000
+++ /tmp/d20251103-13476-137fpl/unicode-display_width-3.2.0/lib/unicode/display_width/constants.rb 2025-11-03 03:04:35.618911592 +0000
@@ -5,2 +5,2 @@
- VERSION = "3.1.4"
- UNICODE_VERSION = "16.0.0"
+ VERSION = "3.2.0"
+ UNICODE_VERSION = "17.0.0"
lib/unicode/display_width/emoji_support.rb
--- /tmp/d20251103-13476-137fpl/unicode-display_width-3.1.4/lib/unicode/display_width/emoji_support.rb 2025-11-03 03:04:35.616911597 +0000
+++ /tmp/d20251103-13476-137fpl/unicode-display_width-3.2.0/lib/unicode/display_width/emoji_support.rb 2025-11-03 03:04:35.618911592 +0000
@@ -1,2 +1 @@
-# require "rbconfig"
-# RbConfig::CONFIG["host_os"] =~ /mswin|mingw/ # windows
+# frozen_string_literal: true
@@ -15,0 +15,4 @@
+ @recommended ||= _recommended
+ end
+
+ def self._recommended |
Contributor
gem compare unicode-emoji 4.0.4 4.1.0Compared versions: ["4.0.4", "4.1.0"]
DIFFERENT date:
4.0.4: 2024-11-19 00:00:00 UTC
4.1.0: 2025-09-09 00:00:00 UTC
DIFFERENT description:
4.0.4: [Emoji 16.0] Provides Unicode Emoji data and regexes, incorporating the latest Unicode and Emoji standards. Includes a categorized list of recommended Emoji.
4.1.0: [Emoji 17.0] Provides Unicode Emoji data and regexes, incorporating the latest Unicode and Emoji standards. Includes a categorized list of recommended Emoji.
DIFFERENT version:
4.0.4: 4.0.4
4.1.0: 4.1.0
DIFFERENT files:
4.0.4->4.1.0:
* Changed:
CHANGELOG.md +5/-0
Gemfile.lock +1/-1
README.md +4/-4
lib/unicode/emoji/constants.rb +3/-3
lib/unicode/emoji/generated/regex.rb +1/-1
lib/unicode/emoji/generated/regex_basic.rb +1/-1
lib/unicode/emoji/generated/regex_include_mqe.rb +1/-1
lib/unicode/emoji/generated/regex_include_mqe_uqe.rb +1/-1
lib/unicode/emoji/generated/regex_include_text.rb +1/-1
lib/unicode/emoji/generated/regex_picto.rb +1/-1
lib/unicode/emoji/generated/regex_picto_no_emoji.rb +1/-1
lib/unicode/emoji/generated/regex_possible.rb +1/-1
lib/unicode/emoji/generated/regex_prop_emoji.rb +1/-1
lib/unicode/emoji/generated/regex_prop_presentation.rb +1/-1
lib/unicode/emoji/generated/regex_text.rb +1/-1
lib/unicode/emoji/generated/regex_valid.rb +1/-1
lib/unicode/emoji/generated/regex_valid_include_text.rb +1/-1
lib/unicode/emoji/generated/regex_well_formed.rb +1/-1
lib/unicode/emoji/generated/regex_well_formed_include_text.rb +1/-1
lib/unicode/emoji/generated_native/regex.rb +1/-1
lib/unicode/emoji/generated_native/regex_include_mqe.rb +1/-1
lib/unicode/emoji/generated_native/regex_include_mqe_uqe.rb +1/-1
lib/unicode/emoji/generated_native/regex_include_text.rb +1/-1
spec/unicode_emoji_spec.rb +5/-0
DIFFERENT test_files:
4.0.4->4.1.0:
* Changed:
spec/unicode_emoji_spec.rb +5/-0 |
Contributor
|
Contributor
Author
|
Superseded by #840. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bumps rubocop from 1.79.2 to 1.81.7.
Release notes
Sourced from rubocop's releases.
... (truncated)
Changelog
Sourced from rubocop's changelog.
... (truncated)
Commits
4a9b053Cut 1.81.74e6aec2Update Changelog8b61b58Remove uselsss code fromLint/Debugger356416dSkip unnecessary logic inStyle/Semicolonc7d19ab[Docs] Tweak the doc forLint/MissingCopEnableDirectiveb7cad37Reuses.versionin gemspec300e29bFix an error forStyle/SoleNestedConditionaleb0b07aRemovebundlergem from Gemfilee4baec8Merge pull request #14629 from koic/fix_false_positives_for_style_float_divisionf8e8cfaMerge pull request #14627 from koic/fix_false_positives_for_style_constant_vi...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 rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill 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 versionwill 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 dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)