From e018f1f48bcdd681d4e1a45bb159a942556776cd Mon Sep 17 00:00:00 2001 From: Yuji Yaginuma Date: Mon, 6 Jan 2025 17:59:33 +0900 Subject: [PATCH 1/3] CI against Ruby 3.4 --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 726c03f4..d2c1ba59 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,7 @@ jobs: fail-fast: false matrix: ruby: + - 3.4 - 3.3 - 3.2 - 3.1 From 0532aec83397e8fb7eec9882bde4439d9de41abc Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Mon, 6 Jan 2025 18:26:56 +0900 Subject: [PATCH 2/3] Make specs work for both Ruby 3.4 and older In Ruby 3.4, the result of Hash.inspect has changed. So I updated the specs to wrap hash with `#{}` to work both 3.4 and older. Ref: https://bugs.ruby-lang.org/issues/20433 --- spec/draper/decorator_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/draper/decorator_spec.rb b/spec/draper/decorator_spec.rb index b3829890..8236f3b0 100644 --- a/spec/draper/decorator_spec.rb +++ b/spec/draper/decorator_spec.rb @@ -451,7 +451,7 @@ module Draper it "includes the context" do decorator = Decorator.new(double, context: {foo: "bar"}) - expect(decorator.inspect).to include '@context={:foo=>"bar"}' + expect(decorator.inspect).to include "#{@context={:foo=>"bar"}}" end it "includes other instance variables" do From 4bd647284467257bb50387a0a687aa15718456ae Mon Sep 17 00:00:00 2001 From: y-yagi Date: Tue, 14 Jan 2025 15:13:24 +0900 Subject: [PATCH 3/3] Update spec/draper/decorator_spec.rb Co-authored-by: Alexander Senko --- spec/draper/decorator_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/draper/decorator_spec.rb b/spec/draper/decorator_spec.rb index 8236f3b0..980cd0fa 100644 --- a/spec/draper/decorator_spec.rb +++ b/spec/draper/decorator_spec.rb @@ -451,7 +451,7 @@ module Draper it "includes the context" do decorator = Decorator.new(double, context: {foo: "bar"}) - expect(decorator.inspect).to include "#{@context={:foo=>"bar"}}" + expect(decorator.inspect).to include "@context=#{{foo: "bar"}}" end it "includes other instance variables" do