提交 ec1993c3 编写于 作者: G Guillermo Iguaran

Prefer each instead of for in

上级 a921cab6
......@@ -71,9 +71,7 @@ def add_observer(observer)
# Notify list of observers of a change.
def notify_observers(*arg)
for observer in observer_instances
observer.update(*arg)
end
observer_instances.each { |observer| observer.update(*arg) }
end
# Total number of observers.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册