The following will raise an exception, and you won’t have to deal with nil:
[1,2,3].find(-> { raise "Expected to find 4 in the array"}) {|e| e == 4}
Developer from somewhere
The following will raise an exception, and you won’t have to deal with nil:
[1,2,3].find(-> { raise "Expected to find 4 in the array"}) {|e| e == 4}