{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":59509,"defaultBranch":"main","name":"mocha","ownerLogin":"freerange","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2008-10-04T13:34:25.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/61936?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1722335387.0","currentOid":""},"activityList":{"items":[{"before":"ce2ae260bb6efb868bb3af703719db0f9ad891fb","after":null,"ref":"refs/heads/fixes-for-ruby-v3.4","pushedAt":"2024-07-30T10:29:47.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"}},{"before":"5c7d14cb7d779bd22da3dbfe9d16ed1091ace7a1","after":"c4bd4af3ad0150f29fdad1ee4bc4e4409da80913","ref":"refs/heads/main","pushedAt":"2024-07-30T10:29:46.000Z","pushType":"pr_merge","commitsCount":5,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"},"commit":{"message":"Merge pull request #672 from freerange/fixes-for-ruby-v3.4\n\nFixes for Ruby v3.4","shortMessageHtmlLink":"Merge pull request #672 from freerange/fixes-for-ruby-v3.4"}},{"before":null,"after":"ce2ae260bb6efb868bb3af703719db0f9ad891fb","ref":"refs/heads/fixes-for-ruby-v3.4","pushedAt":"2024-07-30T10:23:36.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"},"commit":{"message":"Fix frozen string literal warning in InstanceMethod\n\nI've mostly fixed this by using `Object.new` instead of instances of\n`String` to act as partial mocks.\n\nI've also had to disable one test which is specifically stubbing a\nmethod on an instance of `String` when the Ruby version is v3.4 or\nhigher. This is OK, because we already have behaviour in place to\nprevent stubbing of a method on a frozen object [1,2], so the behaviour\nunder test would be moot at that point.\n\nPreviously I was seeing a lot of the following warnings when running\nthe tests under Ruby v3.4:\n\n lib/mocha/instance_method.rb:16: warning: literal string will be frozen in the future\n\n[1]: https://github.com/freerange/mocha/blob/5c7d14cb7d779bd22da3dbfe9d16ed1091ace7a1/lib/mocha/object_methods.rb#L75-L77\n[2]: https://github.com/freerange/mocha/blob/5c7d14cb7d779bd22da3dbfe9d16ed1091ace7a1/lib/mocha/object_methods.rb#L121-L123","shortMessageHtmlLink":"Fix frozen string literal warning in InstanceMethod"}},{"before":"ad675506dd279fdf7505c1f51cda2cdd4e72d66a","after":null,"ref":"refs/heads/fix-jaro-winkler-compilation-on-macos","pushedAt":"2024-07-30T09:09:04.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"}},{"before":"eb1b8ea280920b03ccfa3f4a2764ce828429cbb5","after":"5c7d14cb7d779bd22da3dbfe9d16ed1091ace7a1","ref":"refs/heads/main","pushedAt":"2024-07-30T09:09:02.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"},"commit":{"message":"Fix jaro_winkler compilation errors on MacOS\n\nThe `jaro_winkler` gem is a dependency of `rubocop`.\n\nPreviously I was seeing compilation errors like the following when\nrunning `bundle install` on recent versions of Ruby:\n\n jaro_winkler.c:19:3: error: incompatible function pointer types passing 'VALUE (size_t, VALUE *, VALUE)' (aka 'unsigned long (unsigned long, unsigned long *, unsigned long)') to parameter\n of type 'VALUE (*)(int, union (unnamed union at ~/.asdf/installs/ruby/3.2.3/include/ruby-3.2.0/ruby/internal/anyargs.h:271:1), VALUE)' (aka 'unsigned long (*)(int, union\n (unnamed at ~/.asdf/installs/ruby/3.2.3/include/ruby-3.2.0/ruby/internal/anyargs.h:271:1), unsigned long)') [-Wincompatible-function-pointer-types]\n rb_define_singleton_method(rb_mJaroWinkler, \"distance\",\n ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n ~/.asdf/installs/ruby/3.2.3/include/ruby-3.2.0/ruby/internal/anyargs.h:308:143: note: expanded from macro 'rb_define_singleton_method'\n #define rb_define_singleton_method(obj, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method((arity), (func))((obj), (mid), (func), (arity))\n ^~~~~~\n ~/.asdf/installs/ruby/3.2.3/include/ruby-3.2.0/ruby/internal/anyargs.h:271:1: note: passing argument to parameter here\n RBIMPL_ANYARGS_DECL(rb_define_singleton_method, VALUE, const char *)\n ^\n ~/.asdf/installs/ruby/3.2.3/include/ruby-3.2.0/ruby/internal/anyargs.h:254:72: note: expanded from macro 'RBIMPL_ANYARGS_DECL'\n RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m1(__VA_ARGS__, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); \\\n ^\nThis seems to be the issue described in tonytonyjan/jaro_winkler#51\nwhich was fixed in tonytonyjan/jaro_winkler#52 and which was released in\njaro_winkler v1.5.5 [1].\n\n[1]: https://github.com/tonytonyjan/jaro_winkler/issues/51#issuecomment-1556478433","shortMessageHtmlLink":"Fix jaro_winkler compilation errors on MacOS"}},{"before":"e9de065c32ed738ba87673d1d506d3d304e24461","after":"ad675506dd279fdf7505c1f51cda2cdd4e72d66a","ref":"refs/heads/fix-jaro-winkler-compilation-on-macos","pushedAt":"2024-07-30T09:07:33.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"},"commit":{"message":"Fix jaro_winkler compilation errors on MacOS\n\nThe `jaro_winkler` gem is a dependency of `rubocop`.\n\nPreviously I was seeing compilation errors like the following when\nrunning `bundle install` on recent versions of Ruby:\n\n jaro_winkler.c:19:3: error: incompatible function pointer types passing 'VALUE (size_t, VALUE *, VALUE)' (aka 'unsigned long (unsigned long, unsigned long *, unsigned long)') to parameter\n of type 'VALUE (*)(int, union (unnamed union at ~/.asdf/installs/ruby/3.2.3/include/ruby-3.2.0/ruby/internal/anyargs.h:271:1), VALUE)' (aka 'unsigned long (*)(int, union\n (unnamed at ~/.asdf/installs/ruby/3.2.3/include/ruby-3.2.0/ruby/internal/anyargs.h:271:1), unsigned long)') [-Wincompatible-function-pointer-types]\n rb_define_singleton_method(rb_mJaroWinkler, \"distance\",\n ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n ~/.asdf/installs/ruby/3.2.3/include/ruby-3.2.0/ruby/internal/anyargs.h:308:143: note: expanded from macro 'rb_define_singleton_method'\n #define rb_define_singleton_method(obj, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method((arity), (func))((obj), (mid), (func), (arity))\n ^~~~~~\n ~/.asdf/installs/ruby/3.2.3/include/ruby-3.2.0/ruby/internal/anyargs.h:271:1: note: passing argument to parameter here\n RBIMPL_ANYARGS_DECL(rb_define_singleton_method, VALUE, const char *)\n ^\n ~/.asdf/installs/ruby/3.2.3/include/ruby-3.2.0/ruby/internal/anyargs.h:254:72: note: expanded from macro 'RBIMPL_ANYARGS_DECL'\n RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m1(__VA_ARGS__, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); \\\n ^\nThis seems to be the issue described in tonytonyjan/jaro_winkler#51\nwhich was fixed in tonytonyjan/jaro_winkler#52 and which was released in\njaro_winkler v1.5.5 [1].\n\n[1]: https://github.com/tonytonyjan/jaro_winkler/issues/51#issuecomment-1556478433","shortMessageHtmlLink":"Fix jaro_winkler compilation errors on MacOS"}},{"before":null,"after":"e9de065c32ed738ba87673d1d506d3d304e24461","ref":"refs/heads/fix-jaro-winkler-compilation-on-macos","pushedAt":"2024-07-30T09:02:50.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"},"commit":{"message":"Fix jaro_winkler compilation errors on MacOS\n\nPreviously I was seeing compilation errors like the following when\nrunning `bundle install` on recent versions of Ruby:\n\n jaro_winkler.c:19:3: error: incompatible function pointer types passing 'VALUE (size_t, VALUE *, VALUE)' (aka 'unsigned long (unsigned long, unsigned long *, unsigned long)') to parameter\n of type 'VALUE (*)(int, union (unnamed union at ~/.asdf/installs/ruby/3.2.3/include/ruby-3.2.0/ruby/internal/anyargs.h:271:1), VALUE)' (aka 'unsigned long (*)(int, union\n (unnamed at ~/.asdf/installs/ruby/3.2.3/include/ruby-3.2.0/ruby/internal/anyargs.h:271:1), unsigned long)') [-Wincompatible-function-pointer-types]\n rb_define_singleton_method(rb_mJaroWinkler, \"distance\",\n ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n ~/.asdf/installs/ruby/3.2.3/include/ruby-3.2.0/ruby/internal/anyargs.h:308:143: note: expanded from macro 'rb_define_singleton_method'\n #define rb_define_singleton_method(obj, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method((arity), (func))((obj), (mid), (func), (arity))\n ^~~~~~\n ~/.asdf/installs/ruby/3.2.3/include/ruby-3.2.0/ruby/internal/anyargs.h:271:1: note: passing argument to parameter here\n RBIMPL_ANYARGS_DECL(rb_define_singleton_method, VALUE, const char *)\n ^\n ~/.asdf/installs/ruby/3.2.3/include/ruby-3.2.0/ruby/internal/anyargs.h:254:72: note: expanded from macro 'RBIMPL_ANYARGS_DECL'\n RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m1(__VA_ARGS__, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); \\\n ^\nThis seems to be the issue described in tonytonyjan/jaro_winkler#51\nwhich was fixed in tonytonyjan/jaro_winkler#52 and which was released in\njaro_winkler v1.5.5 [1].\n\n[1]: https://github.com/tonytonyjan/jaro_winkler/issues/51#issuecomment-1556478433","shortMessageHtmlLink":"Fix jaro_winkler compilation errors on MacOS"}},{"before":"48b15caec6f6af1c7bc249b530b239aeed88e2a1","after":null,"ref":"refs/heads/changelog_uri","pushedAt":"2024-07-25T09:53:04.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"}},{"before":"4e2ca1b919cabdf0962b106c0a53d8462ba450b1","after":"eb1b8ea280920b03ccfa3f4a2764ce828429cbb5","ref":"refs/heads/main","pushedAt":"2024-07-25T09:53:02.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"},"commit":{"message":"Add metadata to gemspec, including changelog_uri\n\nThis will make the changelog more discoverable.\n\nFixes #608.","shortMessageHtmlLink":"Add metadata to gemspec, including changelog_uri"}},{"before":null,"after":"48b15caec6f6af1c7bc249b530b239aeed88e2a1","ref":"refs/heads/changelog_uri","pushedAt":"2024-07-25T09:50:23.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"},"commit":{"message":"Add metadata to gemspec, including changelog_uri\n\nThis will make the changelog more discoverable.\n\nFixes #608.","shortMessageHtmlLink":"Add metadata to gemspec, including changelog_uri"}},{"before":"3d77c69073e96f8aeda29d8bc4376a1b6781007a","after":"4e2ca1b919cabdf0962b106c0a53d8462ba450b1","ref":"refs/heads/main","pushedAt":"2024-07-24T11:39:35.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"},"commit":{"message":"[skip ci] Update documentation for v2.4.5","shortMessageHtmlLink":"[skip ci] Update documentation for v2.4.5"}},{"before":"6a91439e90562004f29ffc7a93b38b748747fb5a","after":"3d77c69073e96f8aeda29d8bc4376a1b6781007a","ref":"refs/heads/main","pushedAt":"2024-07-24T10:00:08.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"},"commit":{"message":"Bump version to 2.4.5 & prepare for release","shortMessageHtmlLink":"Bump version to 2.4.5 & prepare for release"}},{"before":"228acc9e67932d12a0b57f92d0eeeee9d1407f57","after":null,"ref":"refs/heads/fix-regression-when-stubbed-method-expects-hash-but-receives-action-controller-parameters-object","pushedAt":"2024-07-24T09:52:14.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"}},{"before":"9f917f80634b90610424d2f12ed5ed8481eb0f6a","after":"6a91439e90562004f29ffc7a93b38b748747fb5a","ref":"refs/heads/main","pushedAt":"2024-07-24T09:52:13.000Z","pushType":"pr_merge","commitsCount":4,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"},"commit":{"message":"Merge pull request #664 from freerange/fix-regression-when-stubbed-method-expects-hash-but-receives-action-controller-parameters-object\n\nFix regression when stubbed method expects Hash but receives ActionController::Parameters object","shortMessageHtmlLink":"Merge pull request #664 from freerange/fix-regression-when-stubbed-me…"}},{"before":null,"after":"228acc9e67932d12a0b57f92d0eeeee9d1407f57","ref":"refs/heads/fix-regression-when-stubbed-method-expects-hash-but-receives-action-controller-parameters-object","pushedAt":"2024-07-24T09:31:04.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"},"commit":{"message":"Fix exact match on ActionController::Parameters\n\nThis was broken in this previous commit [1] which was part of #660 and\nwhich was released in v2.4.3.\n\nPreviously the only requirement we put on `Hash`-like arguments was that\nthey respond to `#keys` & `#[]` methods. However, the change in [1] we\nintroduced an implicit assumption that they also respond to a `#length`\nmethod which is caused the problem described here [2].\n\nHowever, `ActionController::Parameters` [3] is commonly used in Rails\napps and it does *not* respond to `#length`. So it seems better to add a\nguard condition to ensure the object responds to `#keys` and use that to\ndetermine the length.\n\nNote that the `HasEntry`, `HasKey` and `HasKeys` matchers already work\nthis way and so this feels like it makes `HasEntries` more consistent.\n\n[1]: https://github.com/freerange/mocha/commit/5e6a07b2710dac76e9346def561ca0d44765bf86\n[2]: https://github.com/freerange/mocha/issues/662#issuecomment-2246105530\n[3]: https://api.rubyonrails.org/classes/ActionController/Parameters.html","shortMessageHtmlLink":"Fix exact match on ActionController::Parameters"}},{"before":"06ee5bab1a3f0a9e4c5d5ae454deeeb487463721","after":"9f917f80634b90610424d2f12ed5ed8481eb0f6a","ref":"refs/heads/main","pushedAt":"2024-07-23T11:44:30.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"},"commit":{"message":"[skip ci] Update documentation for v2.4.4","shortMessageHtmlLink":"[skip ci] Update documentation for v2.4.4"}},{"before":"869c24e30f622f2ab724de52d765f5d8972bc096","after":"06ee5bab1a3f0a9e4c5d5ae454deeeb487463721","ref":"refs/heads/main","pushedAt":"2024-07-23T11:42:44.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"},"commit":{"message":"Bump version to 2.4.4 & prepare for release","shortMessageHtmlLink":"Bump version to 2.4.4 & prepare for release"}},{"before":"c27e4c63e4d70edf4ccc540f9050c7ed40ac0bb4","after":null,"ref":"refs/heads/fix-regression-when-method-expecting-hash-invoked-with-no-args","pushedAt":"2024-07-23T11:40:18.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"}},{"before":"e95fda25c41faaa4a7737b62a471544c5c2ddf2f","after":"869c24e30f622f2ab724de52d765f5d8972bc096","ref":"refs/heads/main","pushedAt":"2024-07-23T11:40:17.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"},"commit":{"message":"Fix regression when stubbed method invoked with no args\n\nIn this commit [1] which was part of #660 and was released in v2.4.3,\nthe new code didn't take into account that the `parameter` local\nvariable in `HasEntries#matches?` can be `nil` if the stubbed method\nexpects a `Hash` or keyword arguments but is called with no arguments.\n\nPreviously this wasn't a problem, because the `nil` was handled by this\nguard condition [2] in `HasEntry#matches?`. However, now we're calling\n`#length` on `parameter` when `exact` is `true`, we need this new guard\ncondition in `HasEntries#matches?`.\n\n[1]: https://github.com/freerange/mocha/commit/5e6a07b2710dac76e9346def561ca0d44765bf86\n[2]: https://github.com/freerange/mocha/blob/e95fda25c41faaa4a7737b62a471544c5c2ddf2f/lib/mocha/parameter_matchers/has_entry.rb#L68","shortMessageHtmlLink":"Fix regression when stubbed method invoked with no args"}},{"before":null,"after":"c27e4c63e4d70edf4ccc540f9050c7ed40ac0bb4","ref":"refs/heads/fix-regression-when-method-expecting-hash-invoked-with-no-args","pushedAt":"2024-07-23T09:55:13.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"},"commit":{"message":"Fix regression when stubbed method invoked with no args\n\nIn this commit [1] which was part of #660 and was released in v2.4.3,\nthe new code didn't take into account that the `parameter` local\nvariable in `HasEntries#matches?` can be `nil` if the stubbed method\nexpects a `Hash` or keyword arguments but is called with no arguments.\n\nPreviously this wasn't a problem, because the `nil` was handled by this\nguard condition [2] in `HasEntry#matches?`. However, now we're calling\n`#length` on `parameter` when `exact` is `true`, we need this new guard\ncondition in `HasEntries#matches?`.\n\n[1]: https://github.com/freerange/mocha/commit/5e6a07b2710dac76e9346def561ca0d44765bf86\n[2]: https://github.com/freerange/mocha/blob/e95fda25c41faaa4a7737b62a471544c5c2ddf2f/lib/mocha/parameter_matchers/has_entry.rb#L68","shortMessageHtmlLink":"Fix regression when stubbed method invoked with no args"}},{"before":"6c1be005cba78375055c58b3cd255faf8f9f4a42","after":"e95fda25c41faaa4a7737b62a471544c5c2ddf2f","ref":"refs/heads/main","pushedAt":"2024-07-22T12:15:27.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"},"commit":{"message":"[skip ci] Update documentation for v2.4.3","shortMessageHtmlLink":"[skip ci] Update documentation for v2.4.3"}},{"before":"5e6a07b2710dac76e9346def561ca0d44765bf86","after":null,"ref":"refs/heads/fix-regression-in-matching-hash-parameter","pushedAt":"2024-07-22T12:10:07.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"}},{"before":"e62fa61e086199f7777d70e85371525f6c2afe03","after":"6c1be005cba78375055c58b3cd255faf8f9f4a42","ref":"refs/heads/main","pushedAt":"2024-07-22T12:10:05.000Z","pushType":"pr_merge","commitsCount":4,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"},"commit":{"message":"Merge pull request #660 from freerange/fix-regression-in-matching-hash-parameter\n\nFix regression when matching Hash parameter","shortMessageHtmlLink":"Merge pull request #660 from freerange/fix-regression-in-matching-has…"}},{"before":"dc6167cdadf7e36fac3ab0f2792430dc63c3eb37","after":"5e6a07b2710dac76e9346def561ca0d44765bf86","ref":"refs/heads/fix-regression-in-matching-hash-parameter","pushedAt":"2024-07-22T11:54:35.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"},"commit":{"message":"Require exact match for top-level Hash parameter\n\nIn this commit [1] which fixed #647 and which was released in v2.3.0, a\ntop-level `Hash` argument passed into `Expectation#with` was implicitly\nconverted into a `HasEntries` matcher in order to handle \"nested\"\nmatchers used within the keys & values of the `Hash`.\n\nThis _new_ behaviour makes particular sense for keyword arguments where\nthe requirement to wrap such a `Hash` in a call to `#has_entries` was a\nbit surprising as described in #647.\n\nHowever, that change inadvertently broke basic `Hash` parameter matching\nas described in #657, because the `HasEntries` matcher only needs to\nmatch each of the entries specified; it will still match if there are\n*extra* entries in the `Hash` it is matching against.\n\nIn order to fix this without breaking the \"nested\" matching behaviour\nadded in [1], I've added an optional `exact` keyword argument to the\n`HasEntries` constructor and set this to `true` when it's called from\n`PositionalOrKeywordHash#matches?`. I haven't bothered to document the\nnew `exact` argument, because currently it's only used internally.\n\nI did consider introducing a new matcher more like\n`RSpec::Matchers#match` matcher [2], but I decided that wouldn't provide\nas elegant a solution to #647 as the change in this commit.\n\nI can imagine introducing something like `#has_exact_entries` to the\npublic API, but it would probably make sense to add something similar\nfor exact matching of array items at the same time, so I'm going to\nleave that for now.\n\nI've added a few acceptance tests in this commit which would have caught\nthe problem that I inadvertently introduced in [1] and a few that cover\nthe \"nested\" matching behaviour that was introduced in that commit\n(previously I had only added a unit test).\n\n[1]: https://github.com/freerange/mocha/commit/f94e250414335d822ec8d0a1331cb25cf90bf837\n[2]: https://www.rubydoc.info/github/rspec/rspec-expectations/RSpec/Matchers#match-instance_method","shortMessageHtmlLink":"Require exact match for top-level Hash parameter"}},{"before":"20fe45e44b5e33b7c7b8244d4e45cc64393ca7a1","after":"dc6167cdadf7e36fac3ab0f2792430dc63c3eb37","ref":"refs/heads/fix-regression-in-matching-hash-parameter","pushedAt":"2024-07-19T10:44:09.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"},"commit":{"message":"WIP","shortMessageHtmlLink":"WIP"}},{"before":null,"after":"20fe45e44b5e33b7c7b8244d4e45cc64393ca7a1","ref":"refs/heads/fix-regression-in-matching-hash-parameter","pushedAt":"2024-07-18T15:59:27.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"},"commit":{"message":"WIP","shortMessageHtmlLink":"WIP"}},{"before":"e62fa61e086199f7777d70e85371525f6c2afe03","after":"2ecab91403a0644e66b8264a1257bb6139c56399","ref":"refs/heads/floehopper-patch-2","pushedAt":"2024-07-18T14:37:07.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"},"commit":{"message":"Update positional_or_keyword_hash.rb","shortMessageHtmlLink":"Update positional_or_keyword_hash.rb"}},{"before":null,"after":"e62fa61e086199f7777d70e85371525f6c2afe03","ref":"refs/heads/floehopper-patch-2","pushedAt":"2024-07-18T14:37:06.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"},"commit":{"message":"[skip ci] Update documentation for v2.4.2","shortMessageHtmlLink":"[skip ci] Update documentation for v2.4.2"}},{"before":"e62fa61e086199f7777d70e85371525f6c2afe03","after":"eb217b13e3348a0b0db345d8f9577f86883144a4","ref":"refs/heads/floehopper-patch-1","pushedAt":"2024-07-18T14:29:54.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"},"commit":{"message":"Update positional_or_keyword_hash.rb","shortMessageHtmlLink":"Update positional_or_keyword_hash.rb"}},{"before":null,"after":"e62fa61e086199f7777d70e85371525f6c2afe03","ref":"refs/heads/floehopper-patch-1","pushedAt":"2024-07-18T14:29:53.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"floehopper","name":"James Mead","path":"/floehopper","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3169?s=80&v=4"},"commit":{"message":"[skip ci] Update documentation for v2.4.2","shortMessageHtmlLink":"[skip ci] Update documentation for v2.4.2"}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEjNkmKQA","startCursor":null,"endCursor":null}},"title":"Activity · freerange/mocha"}