From: ts Date: 2003-08-07T23:06:45+09:00 Subject: Re: C's static equivalent >>>>> "K" == KONTRA Gergely writes: >> Use a closure K> Could you be more verbose? Eg. how to print out how many times a in ruby, yes. in english, no :-) K> function was called. svg% cat b.rb #!/usr/bin/ruby def test1 a = 10 proc { a += 1; puts a } end class Object define_method(:tt, test1) end tt tt uu = test1 uu[] uu[] svg% svg% b.rb 11 12 11 12 svg% Guy Decoux