summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTalal Al-Humaidi <77169738+Talhumaidi@users.noreply.github.com>2023-01-23 02:48:44 +0000
committerGitHub <noreply@github.com>2023-01-23 11:48:44 +0900
commit93bb415516dec2743c61a647532a061e0555501b (patch)
treef5c67387dd84c7e3ce3278643b6c6d766898bd96
parent8fded5f5d12be958ca803627a541e5a5d9323586 (diff)
[DOC] Change local method to local variable in assignment docs
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7173 Merged-By: nobu <nobu@ruby-lang.org>
-rw-r--r--doc/syntax/assignment.rdoc2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/syntax/assignment.rdoc b/doc/syntax/assignment.rdoc
index 1321bbf3ac..037c2032a8 100644
--- a/doc/syntax/assignment.rdoc
+++ b/doc/syntax/assignment.rdoc
@@ -107,7 +107,7 @@ Rather than printing "true" you receive a NameError, "undefined local variable
or method `a'". Since ruby parses the bare +a+ left of the +if+ first and has
not yet seen an assignment to +a+ it assumes you wish to call a method. Ruby
then sees the assignment to +a+ and will assume you are referencing a local
-method.
+variable.
The confusion comes from the out-of-order execution of the expression. First
the local variable is assigned-to then you attempt to call a nonexistent