[yast-devel] Re: [yast-commit] <web-client> master : Improve robustness --> Funny behavior or Ruby
Klaus KXXmpf schrieb:
- def create_data() - @data = {} - @limits = {} - @limits_list = {} + def create_data + @data = @limits = @limits_list = @data_group = Hash.new status = []
It seems that all variables have now the same reference to ONE Hash. Has anyone an explanation for that ? Greetings Stefan -- ******************************************************************************* Stefan Schubert SUSE LINUX GmbH - Maxfeldstrasse 5 - D-90409 Nuernberg, Germany e-mail: schubi@suse.de ------------------------------------------------------------------------------- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
* Stefan Schubert <schubi@suse.de> [Jul 16. 2009 09:56]:
Klaus KXXmpf schrieb:
- def create_data() - @data = {} - @limits = {} - @limits_list = {} + def create_data + @data = @limits = @limits_list = @data_group = Hash.new status = []
It seems that all variables have now the same reference to ONE Hash. Has anyone an explanation for that ?
Ouch, you're right. Sorry for that. Internally, only nil, true, false, and Integer are represented in a Ruby VALUE. All other object types are references. Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (2)
-
Klaus Kaempf
-
Stefan Schubert