Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI against Ruby 3.4 #939

Merged
merged 3 commits into from
Jan 14, 2025
Merged

CI against Ruby 3.4 #939

merged 3 commits into from
Jan 14, 2025

Conversation

y-yagi
Copy link
Collaborator

@y-yagi y-yagi commented Jan 6, 2025

Description

Ruby 3.4 has been released. I would like to add Ruby 3.4 to CI to confirm whether draper works well with it.

@@ -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"}}"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ruby 3.4 has changed the format of Hash.inspect. So I wrapped this with #{} to work both Ruby 3.4 and older.
Ref: https://bugs.ruby-lang.org/issues/20433

@y-yagi y-yagi marked this pull request as ready for review January 14, 2025 01:59
Copy link
Collaborator

@Alexander-Senko Alexander-Senko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't test my suggestion, but hope it to be valid.

spec/draper/decorator_spec.rb Outdated Show resolved Hide resolved
@y-yagi
Copy link
Collaborator Author

y-yagi commented Jan 14, 2025

It seems that Ruby 2.4 is failing with another issue. I will check.

@Alexander-Senko
Copy link
Collaborator

It seems that Ruby 2.4 is failing with another issue. I will check.

Maybe the time has come to let it fail?

y-yagi and others added 3 commits January 14, 2025 18:24
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
@y-yagi y-yagi merged commit f74a2d4 into drapergem:master Jan 14, 2025
13 checks passed
@y-yagi y-yagi deleted the ci_against_ruby34 branch January 14, 2025 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants