From 99a0c77bb5c2caab783fc3e7f3edb52cd62b7c12 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 20 Oct 2004 00:52:42 +0000 Subject: rdoc git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'eval.c') diff --git a/eval.c b/eval.c index e9b720b67..eda872dc3 100644 --- a/eval.c +++ b/eval.c @@ -7892,6 +7892,22 @@ rb_f_binding(self) return bind; } +/* + * call-seq: + * binding.eval(string [, filename [,lineno]]) => obj + * + * Evaluates the Ruby expression(s) in string, in the + * binding's context. If the optional filename and + * lineno 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 bind_eval(argc, argv, bind) int argc; -- cgit