rdoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
39ecad1339
commit
c1c101e752
16
eval.c
16
eval.c
@ -7892,6 +7892,22 @@ rb_f_binding(self)
|
|||||||
return bind;
|
return bind;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* call-seq:
|
||||||
|
* binding.eval(string [, filename [,lineno]]) => obj
|
||||||
|
*
|
||||||
|
* Evaluates the Ruby expression(s) in <em>string</em>, in the
|
||||||
|
* <em>binding</em>'s context. If the optional <em>filename</em> and
|
||||||
|
* <em>lineno</em> parameters are present, they will be used when
|
||||||
|
* reporting syntax errors.
|
||||||
|
*
|
||||||
|
* def getBinding(param)
|
||||||
|
* return binding
|
||||||
|
* end
|
||||||
|
* b = getBinding("hello")
|
||||||
|
* b.eval("param") #=> "hello"
|
||||||
|
*/
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
bind_eval(argc, argv, bind)
|
bind_eval(argc, argv, bind)
|
||||||
int argc;
|
int argc;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user