diff --git a/debian/changelog b/debian/changelog index 83441fd911524b87d7357264762e06a073016435..c14e55ec9c0480327978932703d8b69e999f96a6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,11 @@ ruby-hashie (3.5.5-3) UNRELEASED; urgency=medium * Update watch file format version to 4. * Bump debhelper from old 12 to 13. + [ Daniel Leidert ] + * d/patches/0002-Suppress-keyword-arguments-warning-for-Ruby-2.7.0.patch: Add + - Fix ArgumentError with Ruby 3 (closes: #996239). + * d/patches/series: Enable new patch. + -- Utkarsh Gupta <guptautkarsh2102@gmail.com> Tue, 13 Aug 2019 05:35:57 +0530 ruby-hashie (3.5.5-2) unstable; urgency=medium diff --git a/debian/patches/0002-Suppress-keyword-arguments-warning-for-Ruby-2.7.0.patch b/debian/patches/0002-Suppress-keyword-arguments-warning-for-Ruby-2.7.0.patch new file mode 100644 index 0000000000000000000000000000000000000000..5af6078c51c922e8b1acd35022376f9ae902071d --- /dev/null +++ b/debian/patches/0002-Suppress-keyword-arguments-warning-for-Ruby-2.7.0.patch @@ -0,0 +1,40 @@ +From: Koichi ITO <koic.ito@gmail.com> +Date: Wed, 15 Jan 2020 12:42:44 +0900 +Subject: Suppress keyword arguments warning for Ruby 2.7.0 + +This PR suppresses the following keyword arguments warning for Ruby 2.7.0. + +```console +% bundle exec rspec spec/hashie/extensions/mash/symbolize_keys_spec.rb +(snip) + +/Users/koic/src/github.com/hahie/hashie/spec/hashie/extensions/mash/symbolize_keys_spec.rb:29: +warning: Using the last argument as keyword parameters is +deprecated; maybe ** should be added to the call +/Users/koic/src/github.com/hahie/hashie/spec/hashie/extensions/mash/symbolize_keys_spec.rb:21: +warning: The called method `call' is defined here +``` + +For Ruby 2.8.0-dev (Ruby 3.0) the warning will be `ArgumentError`. +ruby/ruby#2794 + +Origin: https://github.com/hashie/hashie/commit/570409727e6ce02db3ad39579c49dcc73769ebc2.patch +Forwarded: https://github.com/hashie/hashie/pull/511 +Bug-Debian: https://bugs.debian.org/996239 +--- + spec/hashie/extensions/mash/symbolize_keys_spec.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/spec/hashie/extensions/mash/symbolize_keys_spec.rb b/spec/hashie/extensions/mash/symbolize_keys_spec.rb +index 1e52534..9846737 100644 +--- a/spec/hashie/extensions/mash/symbolize_keys_spec.rb ++++ b/spec/hashie/extensions/mash/symbolize_keys_spec.rb +@@ -26,7 +26,7 @@ RSpec.describe Hashie::Extensions::Mash::SymbolizeKeys do + end + let(:instance) { my_mash.new('outer' => { 'inner' => 42 }, 'testing' => [1, 2, 3]) } + +- subject { destructure.call(instance) } ++ subject { destructure.call(**instance) } + + it 'is converted on method calls' do + expect(subject).to eq(outer: { inner: 42 }, testing: [1, 2, 3]) diff --git a/debian/patches/series b/debian/patches/series index 9eb5093cb4c57575ba3a2ad2e5dd69179856add4..7c66745b99831781817e1785a63f34788f18f3d1 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ 0001-spec-spec_helper.rb-don-t-load-pry.patch +0002-Suppress-keyword-arguments-warning-for-Ruby-2.7.0.patch