From: esplair@... (flattree) Date: 2004-07-16T03:12:16+09:00 Subject: Stumped newbie... Here is what I'm trying to do. Simulate nodes with objects. The nodes are updated with the class's update method, now where I'm stuck is acessing outside variables within the method. Simply, how do I refer to an objects state within a method? class Gate def initialize @state = rand(2) end def state @state end def update @state = a[1].state end end num = 2 a = Array.new for b in 0..(num - 1) a[b] = Gate.new puts a[b].state end puts puts a[0].state a[0].update puts a[0].state Can anyone tell me how to do this?