This page contains automated test results for code from O'Reilly's Ruby Cookbook. If this code looks interesting or useful, you might want to buy the whole book.
| Allowing Input Editing with Readline | ||
|---|---|---|
| Code | Expected | Actual |
print "What's your favorite vegetable?> " puts gets.chomp.capitalize + "? Are you crazy?" |
... |
What's your favorite vegetable?> NoMethodError: private method `chomp' called for nil:NilClass from (irb):2 |