summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-20 00:52:42 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-20 00:52:42 +0000
commitc1c101e752f483d4956f66fd567ec86d0274899a (patch)
tree780b87e04133ad14be882d64b01d9fc732f13de0 /eval.c
parent39ecad1339f5c41eff1ca54155c0dea4c566e13c (diff)
rdoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index e9b720b67d..eda872dc38 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 <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
bind_eval(argc, argv, bind)
int argc;