1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Work around rbx bug by checking if Range#max is nil

This commit is contained in:
Ryan Fitzgerald 2012-12-27 18:03:09 -08:00
parent b5455a10bc
commit 1d214a496c

View file

@ -144,7 +144,7 @@ class Pry
if _slop.present?(:r)
replay_sequence = replay_sequence.split("\n").join('; ')
index = opts[:r]
index = index.min if index.min == index.max
index = index.min if index.min == index.max || index.max.nil?
raise CommandError, "Replay index #{ index } points out to another replay call: `#{ replay_sequence }`"
end