diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-27 07:22:38 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-27 07:22:38 +0000 |
commit | b16d73ae0c55db444026780871552b81693f5438 (patch) | |
tree | 9ae9a063a1f7dc3c1bd902facd2b34352c4c7490 /NEWS | |
parent | 35e3e13ce76dd3525d8f9572a5be9426189959c5 (diff) | |
download | ruby-b16d73ae0c55db444026780871552b81693f5438.tar.gz |
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
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -34,7 +34,7 @@ sufficient information, see the ChangeLog file or Redmine * "shadowing outer local variable" warning was removed. [Feature #12490] 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) |