From: "Sebastjan H." Date: 2012-08-03T22:06:57+09:00 Subject: Re: learning by doing part 2 - tc game I wanted to test this on a simple case, so I wrote the following: ------------------------------------------ def attack(target) target -= 200 end class A def initialize(name, hp) @name = name @hp = hp end def hp() @hp end def name() @name end end players = [] << A.new("test", 400) attack(players[0].hp) puts players[0].hp ------------------------------------------ The code runs, but the result is 400. As if the attack method did nothing. What am I doing wrong? -- Posted via http://www.ruby-forum.com/.