From 265c5a3f86bf27699a1b18b74b976cc241d8b42c Mon Sep 17 00:00:00 2001 From: sho-h Date: Thu, 7 May 2015 13:28:03 +0000 Subject: * 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 --- proc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'proc.c') diff --git a/proc.c b/proc.c index db79870b2d..44ec281273 100644 --- a/proc.c +++ b/proc.c @@ -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 -- cgit v1.2.3