Age | Commit message (Collapse) | Author | |
---|---|---|---|
3 days | Update to ruby/spec@6b04c1d | Andrew Konchin | |
2024-03-14 | Update to ruby/spec@89175b2 | Benoit Daloze | |
2024-02-19 | [Bug #20280] Fix wrong tests | Nobuyoshi Nakada | |
2023-12-07 | Fix keyword splat passing as regular argument | Jeremy Evans | |
Since Ruby 3.0, Ruby has passed a keyword splat as a regular argument in the case of a call to a Ruby method where the method does not accept keyword arguments, if the method call does not contain an argument splat: ```ruby def self.f(obj) obj end def self.fs(*obj) obj[0] end h = {a: 1} f(**h).equal?(h) # Before: true; After: false fs(**h).equal?(h) # Before: true; After: false a = [] f(*a, **h).equal?(h) # Before and After: false fs(*a, **h).equal?(h) # Before and After: false ``` The fact that the behavior differs when passing an empty argument splat makes it obvious that something is not working the way it is intended. Ruby 2 always copied the keyword splat hash, and that is the expected behavior in Ruby 3. This bug is because of a missed check in setup_parameters_complex. If the keyword splat passed is not mutable, then it points to an existing object and not a new object, and therefore it must be copied. Now, there are 3 specs for the broken behavior of directly using the keyword splatted hash. Fix two specs and add a new version guard. Do not keep the specs for the broken behavior for earlier Ruby versions, in case this fix is backported. For the ruby2_keywords spec, just remove the related line, since that line is unrelated to what the spec is testing. Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> | |||
2023-06-26 | Update to ruby/spec@30e1c35 | Benoit Daloze | |
2023-02-27 | Update to ruby/spec@e7dc804 | Benoit Daloze | |
2022-04-25 | Update to ruby/spec@3affe1e | Benoit Daloze | |
2021-10-20 | Update to ruby/spec@d6921ef | Benoit Daloze | |
2021-07-29 | Update to ruby/spec@b65d01f | Benoit Daloze | |
2021-06-02 | Update to ruby/spec@a0b7d0d | Benoit Daloze | |
2021-03-27 | Update to ruby/spec@fd6eddd | Benoit Daloze | |
2020-11-27 | Update to ruby/spec@ac878ad | Benoit Daloze | |
2020-05-03 | Update to ruby/spec@032ee74 | Benoit Daloze | |
2019-09-29 | Update to ruby/spec@519df35 | Benoit Daloze | |
2019-08-30 | Update specs to handle non-Symbols for keyword splats in 2.7 | Jeremy Evans | |
Also handle some warnings for behavior that will change in 3.0. Notes: Merged: https://github.com/ruby/ruby/pull/2395 | |||
2019-07-27 | Update to ruby/spec@875a09e | Benoit Daloze | |
2019-06-27 | Update to ruby/spec@8d74d49 | Benoit Daloze | |
2018-03-04 | Update to ruby/spec@c1b568b | eregon | |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e | |||
2017-09-20 | Move spec/rubyspec to spec/ruby for consistency | eregon | |
* Other ruby implementations use the spec/ruby directory. [Misc #13792] [ruby-core:82287] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |