From: Trans Date: 2007-06-15T08:48:43+09:00 Subject: Reasonable practice? It the following reasonable? How thread safe is it? class X attr :type def initialize(ary) @ary = ary end def go @ary.each { |x| @type = x run } end def run puts type end end X.new(['a', 'b', 'c']).go Is changing the instance variable through each iteration a bad idea? Of course I could pass the type to #run as an argument, but I'm experimenting with the concept of "service points" and was wondering if type could safely be one in this case. My alternative to keep type as a serve point is to create a Runner class that took type as its initialize argument, but that seems code heavy. Thanks, T.