mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* proc.c: [DOC] rdoc code formatting
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
70973af1d5
commit
ff1abb0367
2 changed files with 27 additions and 23 deletions
|
@ -1,3 +1,7 @@
|
|||
Sat Aug 10 09:19:04 2013 Zachary Scott <e@zzak.io>
|
||||
|
||||
* proc.c: [DOC] rdoc code formatting
|
||||
|
||||
Sat Aug 10 09:12:01 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* parse.y (rb_id_attrset): check if the argument is valid type as an
|
||||
|
|
46
proc.c
46
proc.c
|
@ -448,15 +448,15 @@ check_local_id(VALUE bindval, volatile VALUE *pname)
|
|||
*
|
||||
* Returns a +value+ of local variable +symbol+.
|
||||
*
|
||||
* def foo
|
||||
* a = 1
|
||||
* binding.local_variable_get(:a) #=> 1
|
||||
* binding.local_variable_get(:b) #=> NameError
|
||||
* end
|
||||
* def foo
|
||||
* a = 1
|
||||
* binding.local_variable_get(:a) #=> 1
|
||||
* binding.local_variable_get(:b) #=> NameError
|
||||
* end
|
||||
*
|
||||
* This method is short version of the following code.
|
||||
*
|
||||
* binding.eval("#{symbol}")
|
||||
* binding.eval("#{symbol}")
|
||||
*
|
||||
*/
|
||||
static VALUE
|
||||
|
@ -485,17 +485,17 @@ bind_local_variable_get(VALUE bindval, VALUE sym)
|
|||
*
|
||||
* Set local variable named +symbol+ as +obj+.
|
||||
*
|
||||
* 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
|
||||
* p a #=> 2
|
||||
* p b #=> NameError
|
||||
* end
|
||||
* 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
|
||||
* p a #=> 2
|
||||
* p b #=> NameError
|
||||
* end
|
||||
*
|
||||
* This method is a similar behavior of the following code
|
||||
*
|
||||
|
@ -529,15 +529,15 @@ bind_local_variable_set(VALUE bindval, VALUE sym, VALUE val)
|
|||
*
|
||||
* Returns a +true+ if a local variable +symbol+ exists.
|
||||
*
|
||||
* def foo
|
||||
* a = 1
|
||||
* binding.local_variable_defined?(:a) #=> true
|
||||
* binding.local_variable_defined?(:b) #=> false
|
||||
* end
|
||||
* def foo
|
||||
* a = 1
|
||||
* binding.local_variable_defined?(:a) #=> true
|
||||
* binding.local_variable_defined?(:b) #=> false
|
||||
* end
|
||||
*
|
||||
* This method is short version of the following code.
|
||||
*
|
||||
* binding.eval("defined?(#{symbol}) == 'local-variable'")
|
||||
* binding.eval("defined?(#{symbol}) == 'local-variable'")
|
||||
*
|
||||
*/
|
||||
static VALUE
|
||||
|
|
Loading…
Reference in a new issue