Skip to content

Commit

Permalink
replace ruby 3.4 preview1 with preview2 (#127)
Browse files Browse the repository at this point in the history
* replace ruby 3.4 preview1 with preview2

* fix spec

* remarks
  • Loading branch information
mensfeld authored Oct 9, 2024
1 parent b0dc4fe commit e3ebb3e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fail-fast: false
matrix:
ruby:
- '3.4.0-preview1'
- '3.4.0-preview2'
- '3.3'
- '3.2'
- '3.1'
Expand Down
10 changes: 8 additions & 2 deletions spec/rdkafka/consumer/topic_partition_list_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,18 @@
end

describe "#to_s" do
let(:expected) do
if RUBY_VERSION >= '3.4.0'
"<TopicPartitionList: {\"topic1\" => [<Partition 0>, <Partition 1>]}>"
else
"<TopicPartitionList: {\"topic1\"=>[<Partition 0>, <Partition 1>]}>"
end
end

it "should return a human readable representation" do
list = Rdkafka::Consumer::TopicPartitionList.new
list.add_topic("topic1", [0, 1])

expected = "<TopicPartitionList: {\"topic1\"=>[<Partition 0>, <Partition 1>]}>"

expect(list.to_s).to eq expected
end
end
Expand Down

0 comments on commit e3ebb3e

Please sign in to comment.