diff options
author | Talal Al-Humaidi <[email protected]> | 2023-01-23 02:48:44 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2023-01-23 11:48:44 +0900 |
commit | 93bb415516dec2743c61a647532a061e0555501b (patch) | |
tree | f5c67387dd84c7e3ce3278643b6c6d766898bd96 /doc/syntax/assignment.rdoc | |
parent | 8fded5f5d12be958ca803627a541e5a5d9323586 (diff) |
[DOC] Change local method to local variable in assignment docs
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7173
Merged-By: nobu <[email protected]>
Diffstat (limited to 'doc/syntax/assignment.rdoc')
-rw-r--r-- | doc/syntax/assignment.rdoc | 2 |
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 |