Thus, if you have something like
case foo
when Bar if foo.invalid?
# ...
when Widget
# ...
end
i.e. you expect either an invalid Bar or a Widget to be returned.
If neither happens, you cannot debug this without trying again with puts or pry.
Thus, if you have something like
case foo
when Bar if foo.invalid?
# ...
when Widget
# ...
end
i.e. you expect either an invalid Bar or a Widget to be returned.
If neither happens, you cannot debug this without trying again with puts or pry.