examples/rosettacode: update ab to not crash on tests
[nit.git] / examples / rosettacode / ab.nit
index 9138c0c..ce18fc0 100644 (file)
@@ -10,4 +10,8 @@
 module ab
 
 var words = gets.split(" ")
+if words.length != 2 then
+       print "Expected two numbers"
+       return
+end
 print words[0].to_i + words[1].to_i