diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/syntax/methods.rdoc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/syntax/methods.rdoc b/doc/syntax/methods.rdoc index 7d334d5a16..a47c1a3cbf 100644 --- a/doc/syntax/methods.rdoc +++ b/doc/syntax/methods.rdoc @@ -147,14 +147,14 @@ evaluated. 1 + 1 # this expression is never evaluated end -Note that for assignment methods the return value will be ignored when using the assignment syntax. -Instead, the argument will be returned: +Note that for assignment methods the return value will be ignored when using +the assignment syntax. Instead, the argument will be returned: def a=(value) return 1 + value end - p(a = 5) # prints 5 + p(self.a = 5) # prints 5 The actual return value will be returned when invoking the method directly: |