summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-27 07:22:38 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-27 07:22:38 +0000
commitb16d73ae0c55db444026780871552b81693f5438 (patch)
tree9ae9a063a1f7dc3c1bd902facd2b34352c4c7490
parent35e3e13ce76dd3525d8f9572a5be9426189959c5 (diff)
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
-rw-r--r--NEWS2
1 files changed, 1 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index a49416eb17..89e2ebb648 100644
--- a/NEWS
+++ b/NEWS
@@ -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)