summaryrefslogtreecommitdiff
path: root/doc/syntax/methods.rdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/syntax/methods.rdoc')
-rw-r--r--doc/syntax/methods.rdoc6
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: