Is there any such thing as static variables in Ruby that would behave like they do in C functions?
Here\'s a quick example of what I mean. It prints \"6\\n7\\n\" to the
You can use a global variable:
$a = 5 def test $a += 1 end p test #=> 6 p test #=> 7