rails/rails — comment on commit 4ef74536940ea4c8c7f8c2cb0252bfe5f0db6fdf
File:  line 0
By josevalim:

2) Adds an assignment in the if condition, which is arguably a risky idiom

Deny. It is not a risky idiom and it is used over and over in Rails.

3) It introduces another require (and another dependency)

The require had to be there before this commit, but DHH forgot to add it

id = env['HTTP_X_REQUEST_ID'].presence and id.gsub(/[^\w\d\-]/, "").first(255)

If you read the Rails coding guidelines, we explicitly ask to not use `and`.