Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Prefer 'each' syntax instead of 'for in' #1267

Merged
merged 2 commits into from

2 participants

@guilleiguaran

The last about that

@josevalim josevalim merged commit 408bbdc into from
@jake3030 jake3030 referenced this pull request from a commit in jake3030/rails
jvoorhis Methods invoked within named scope Procs should respect the scope sta…
…ck. [#1267 state:resolved]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
6a13376
@jake3030 jake3030 referenced this pull request from a commit in jake3030/rails
@jeremy jeremy Revert "Methods invoked within named scope Procs should respect the s…
…cope stack. [#1267 state:resolved]"

This reverts commit 6a13376.

Conflicts:

	activerecord/test/cases/named_scope_test.rb
d83b182
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
2  activeresource/lib/active_resource/http_mock.rb
@@ -55,7 +55,7 @@ def initialize(responses)
@responses = responses
end
- for method in [ :post, :put, :get, :delete, :head ]
+ [ :post, :put, :get, :delete, :head ].each do |method|
# def post(path, request_headers = {}, body = nil, status = 200, response_headers = {})
# @responses[Request.new(:post, path, nil, request_headers)] = Response.new(body || "", status, response_headers)
# end
View
2  activesupport/lib/active_support/buffered_logger.rb
@@ -77,7 +77,7 @@ def add(severity, message = nil, progname = nil, &block)
# def info
# def warn
# def debug
- for severity in Severity.constants
+ Severity.constants.each do |severity|
class_eval <<-EOT, __FILE__, __LINE__ + 1
def #{severity.downcase}(message = nil, progname = nil, &block) # def debug(message = nil, progname = nil, &block)
add(#{severity}, message, progname, &block) # add(DEBUG, message, progname, &block)
Something went wrong with that request. Please try again.