Skip to content

Commit

Permalink
Fix compatibility with Ruby 3.4.0 in ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
annzenkina committed Jan 2, 2025
1 parent 39f8834 commit 8312f9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/pycall/pyobject_wrapper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ module PyCall
list = PyCall::List.new([*1..10])
expect(list[(1..-1).step(2)]).to eq(PyCall::List.new([2, 4, 6, 8, 10]))
expect(list[(1..-2).step(2)]).to eq(PyCall::List.new([2, 4, 6, 8]))
expect(list[(nil..nil).step(-1)]).to eq(PyCall::List.new([*1..10].reverse))
expect(list[(10..1).step(-1)]).to eq(PyCall::List.new([*1..10].reverse))
expect(list[(-1..0).step(-1)]).to eq(PyCall::List.new([*1..10].reverse))
expect(list[(-1...0).step(-1)]).to eq(PyCall::List.new([*2..10].reverse))
expect(list[(-2..2).step(-2)]).to eq(PyCall::List.new([9, 7, 5, 3]))
Expand Down

0 comments on commit 8312f9d

Please sign in to comment.