- Joined
- Sep 9, 2015
- Messages
- 297
- Reaction score
- 29
- First Language
- English
- Primarily Uses
Hi! 
Got a quick question about arrays in a definition for example:
def test_onevalue += 2value2 += 3@my_array_test = Array.new@my_array_test2 = Array.new@my_array_test.push(value)@my_array_test2.push(value2)msgbox(@my_array_test.size)msgbox(@my_array_test.size2)endDoes instance arrays gets cleared after the definition is called? I'm calling the same definition three times and it keeps coming back the same array size. Shouldn't the array supposed to get longer as I keep calling the definition?
Got a quick question about arrays in a definition for example:
def test_onevalue += 2value2 += 3@my_array_test = Array.new@my_array_test2 = Array.new@my_array_test.push(value)@my_array_test2.push(value2)msgbox(@my_array_test.size)msgbox(@my_array_test.size2)endDoes instance arrays gets cleared after the definition is called? I'm calling the same definition three times and it keeps coming back the same array size. Shouldn't the array supposed to get longer as I keep calling the definition?