Kenneth Collins wrote: > Gregory Seidman wrote: >> This is my first Ruby quiz. I was hoping to have the whole thing done >> by the end of the first 48 hours, but I kept getting hung up on edge >> cases. >> I did figure out the binary approach on my own, though. >> > > Gregory, this is an amazing solution! However I got a failure trying > some arbitrarily selected src and dst values: > > $ ruby test60.rb 4934939 39329291 > ./60.rb:47:in `halve': Trying to halve an odd number: 49 (RuntimeError) > from ./60.rb:127:in `solve' > from test60.rb:7 Another case with smaller numbers: $ ruby test60.rb 49 64 ./60.rb:47:in `halve': Trying to halve an odd number: 49 (RuntimeError) from ./60.rb:127:in `solve' from test60.rb:7 -- Posted via http://www.ruby-forum.com/.