Permalink
Browse files

Prefer 'each' over 'for in' syntax.

  • Loading branch information...
smartinez87 committed Jun 8, 2011
1 parent 1300c03 commit 49dcc4ff0c137089ff3420ce70ca64a00573884f
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/core_ext/string/output_safety.rb
@@ -112,7 +112,7 @@ def to_yaml(*args)
to_str.to_yaml(*args)
end
- for unsafe_method in UNSAFE_STRING_METHODS
+ UNSAFE_STRING_METHODS.each do |unsafe_method|

This comment has been minimized.

Show comment Hide comment
@gmile

gmile Jun 8, 2011

Contributor

Btw, any perf background on this? Or just keeping code styling consistent?

@gmile

gmile Jun 8, 2011

Contributor

Btw, any perf background on this? Or just keeping code styling consistent?

This comment has been minimized.

Show comment Hide comment
@josevalim

josevalim Jun 8, 2011

Contributor

code style.

@josevalim

josevalim Jun 8, 2011

Contributor

code style.

class_eval <<-EOT, __FILE__, __LINE__
def #{unsafe_method}(*args)
super.to_str

0 comments on commit 49dcc4f

Please sign in to comment.