On Jan 29, 2008, at 4:33 PM, Atsuhiro Teshima wrote:

> Hi, I'm Atsuhiro.
> this is the first time I contribute to Ruby-forum.
>
> I find one solution for Ruby-Quiz154.

Welcome!

> the following is my solution
> (To tell the truth, I have only one-month programming experience and
> Ruby is the first programming language I choose.So, I'll glad if you
> point out some problem in my solution.)

Wow.  I promise I wasn't solving problems this hard when I was so  
new.  Great work!

Youe code does have a small problem with variable scoping.  To see it,  
change the last few lines to:

   a = Making_change.new
   p a.make_change(52)
   p a.make_change(52)

and run it.

We all run into this when we are new and quickly learn that global  
variables are almost never what we want.  In this case, your global  
$change variable is the problem.

I'll stop talking there and see if that's a big enough hint to help  
you fix it.  If not, just let us know and I'll give more hints.

Again, I'm impressed!

James Edward Gray II