1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Update the example of local variable shadowing

I came up with this snippet when we were trying to convince Matz.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
knu 2018-10-27 07:22:38 +00:00
parent 35e3e13ce7
commit b16d73ae0c

2
NEWS
View file

@ -34,7 +34,7 @@ sufficient information, see the ChangeLog file or Redmine
* "shadowing outer local variable" warning was removed. [Feature #12490] * "shadowing outer local variable" warning was removed. [Feature #12490]
You can now write the following without warning. You can now write the following without warning.
user = User.all.find {|user| cond(user) } user = users.find {|user| cond(user) }
=== Core classes updates (outstanding ones only) === Core classes updates (outstanding ones only)