diff options
author | sho-h <sho-h@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-05-07 13:28:03 +0000 |
---|---|---|
committer | sho-h <sho-h@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-05-07 13:28:03 +0000 |
commit | daed91295479ff3e981bcc9e395721ba4057c79e (patch) | |
tree | bed6d5e3d8ee36c5f5ddbc9ba5f4ac1457f271fd /proc.c | |
parent | 8869cdf576757d567e2c14453297fc932627563f (diff) | |
download | ruby-daed91295479ff3e981bcc9e395721ba4057c79e.tar.gz |
* proc.c: [DOC] fix Binding#local_variable_set example. [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -476,12 +476,12 @@ bind_local_variable_get(VALUE bindval, VALUE sym) * * def foo * a = 1 - * b = binding - * b.local_variable_set(:a, 2) # set existing local variable `a' - * b.local_variable_set(:b, 3) # create new local variable `b' - * # `b' exists only in binding. - * b.local_variable_get(:a) #=> 2 - * b.local_variable_get(:b) #=> 3 + * bind = binding + * bind.local_variable_set(:a, 2) # set existing local variable `a' + * bind.local_variable_set(:b, 3) # create new local variable `b' + * # `b' exists only in binding. + * p bind.local_variable_get(:a) #=> 2 + * p bind.local_variable_get(:b) #=> 3 * p a #=> 2 * p b #=> NameError * end |