From: "Peña, Botp" Date: 2007-10-19T13:59:09+09:00 Subject: Re: combinations listing From: mortee [mailto:mortee.lists@kavemalna.hu] # However, I'd ask why are you using class variables # (ones starting with @@)? At least in its current form, # your solution seems quite procedural, so it seems like # simple local variables would suffice. nope. outside locals wont be visible inside methods. > x=1 => 1 > def test > p x > end => nil > test NameError: undefined local variable or method `x' for main:Object > @@x=1 => 1 > def test > p @@x > end => nil > test 1 => nil # You only need @@ if you want some value to be shared by all # instances of a given class. sometimes i use it in place of constants or globals (since constants give warnings and globals are... gloables :) kind regards -botp