Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 10th, 2012  |  syntax: Ruby  |  size: 0.13 KB  |  views: 466  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. def g b=-1,t=101
  2.   puts (a=rand(b+1...t)),' high/low/right?'
  3.   (o=STDIN.gets)[/\Ah/] ? g(b,a) : o[/\Al/] ? g(a,t) : (puts "yay!")
  4. end;g