diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-20 00:52:42 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-20 00:52:42 +0000 |
commit | 99a0c77bb5c2caab783fc3e7f3edb52cd62b7c12 (patch) | |
tree | 780b87e04133ad14be882d64b01d9fc732f13de0 /eval.c | |
parent | b74ce2ebfb9220ff9423458bb0af784fcbc9c3ad (diff) | |
download | ruby-99a0c77bb5c2caab783fc3e7f3edb52cd62b7c12.tar.gz ruby-99a0c77bb5c2caab783fc3e7f3edb52cd62b7c12.tar.xz ruby-99a0c77bb5c2caab783fc3e7f3edb52cd62b7c12.zip |
rdoc
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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; |