動的言語の問題点、大規模開発でテスト工数が増大
■ このスレッドは過去ログ倉庫に格納されています
0723デフォルトの名無しさん
2012/06/18(月) 18:50:56.97class CounterClass
attr_reader :count_proc
def initialize
@count_proc = Proc.new{
counter=0
lambda{ counter+=1 }
}.call
end
end
counter1 = CounterClass.new
counter2 = CounterClass.new
p counter1.count_proc.call #=> 1
p counter1.count_proc.call #=> 2
p counter2.count_proc.call #=> 1
■ このスレッドは過去ログ倉庫に格納されています