I think the documentation is wrong here, I don’t know of a way to make play_pattern_timed behave like that. Probably this is how it worked in an old version of Sonic Pi and it was never updated.
However, you can make your own function that does what you want:
define :play_timed do |notes, times, **args|
ts = times.ring
notes.each_with_index do |note, i|
play note, **args
sleep ts[i]
end
end
play_timed [40, 42, 44, 46], [1, 2, 3], amp: 2
This will play each note without altering the individual durations. It’s not exactly like the example though, in that it includes a final sleep after the last note, which I think makes more sense, but if you don’t want that you can change the sleep line to:
sleep ts[i] if i != notes.length - 1