summaryrefslogtreecommitdiff
path: root/spec/ruby/core/string/encode_spec.rb
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-04-08 18:45:50 -0700
committerJeremy Evans <code@jeremyevans.net>2019-08-30 12:39:31 -0700
commit896e42d93f52966644c2700ed9fd18f2a1988dd3 (patch)
treed3e4d052f3947dd92db466a43efbde45764dd6e4 /spec/ruby/core/string/encode_spec.rb
parent15bca0d4d373820fa648c351dc13c2131849d9b3 (diff)
Restore splitting of hashes into positional and keyword arguments, add warning
This restores compatibility with Ruby 2.6, splitting the last positional hash into positional and keyword arguments if it contains both symbol and non-symbol keys. However, in this case it will warn, as the behavior in Ruby 3 will be to not split the hash and keep it as a positional argument. This does not affect the handling of mixed symbol and non-symbol keys in bare keywords. Those are still treated as keywords now, as they were before this patch. This results in different behavior than Ruby 2.6, which would split the bare keywords and use the non-Symbol keys as a positional arguments.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2395
Diffstat (limited to 'spec/ruby/core/string/encode_spec.rb')
0 files changed, 0 insertions, 0 deletions