From: Jeremy Henty Date: 2007-07-24T18:40:19+09:00 Subject: Re: Static variables in Ruby. On 2007-07-24, Robert Klemme wrote: > If you mean static variables that are visible in a single method > only, then no, there is no way to do it. *cough* class Foo count = 0 define_method(:foo) { count += 1 } end x = Foo.new 3.times { puts x.foo } ==> 1 2 3 Regards, Jeremy Henty