Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Prefer each instead of for in

  • Loading branch information...
commit ec1993c33f8b1493cc4f55102d9c4dee178306a2 1 parent a921cab
@guilleiguaran authored
Showing with 1 addition and 3 deletions.
  1. +1 −3 activemodel/lib/active_model/observing.rb
View
4 activemodel/lib/active_model/observing.rb
@@ -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.
Please sign in to comment.
Something went wrong with that request. Please try again.