From: vsv Date: 2008-01-27T17:49:57+09:00 Subject: Re: Making Change (#154) On Jan 25, 4:24 pm, James Gray wrote: > On Jan 25, 2008, at 3:09 PM, Jesús Gabriel y Galán wrote: > > > On Jan 25, 2008 9:53 PM, Dominik Honnef wrote: > >> On [Sat, 26.01.2008 00:50], Ruby Quiz wrote: > >>> In "Practical Ruby Projects," the author includes a couple of > >>> chapters involving > >>> coin simulations. These simulators are used to explore the > >>> possibilities of > >>> replacing a certain coin or adding a new coin. > > >> Are there any advanced combinations of change/array of coins which > >> are likely to fail > >> on some implementations? > > > Is it ok to share test cases before the spoiler? > > Sure. > > James Edward Gray II I found this combination problematic: make_change(1023, (1..10).map{|n| 2**n}) # must be nil