title: Incrementing a structs variable inside an array?
body: <p>Cannot get user.points to increment.</p>
  
  <pre><code>Userspoints = Struct.new(:name, :points)
  
  player = "placeholder"
  array = []
  
  user = Userspoints.new(player, 0)
  
  array &lt;&lt; user.name &lt;&lt; user.points
  
  found = array.index(user.name)
  points = array[found + 1]
  
  array[user.points += 50]
  
  print array
  </code></pre>
  
  <p>Expected output: ["placeholder", 50]</p>
  
  <p>Actual output: ["placeholder", 0]</p>