diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-05-13 10:01:09 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-05-13 10:01:09 +0000 |
commit | ccc13869790d312f614128204c5546d5e9ad0b3f (patch) | |
tree | 4a834e153187f75cc2a336f742aea845f55557e6 /eval.c | |
parent | c6ac6cb4542b845eb4c18a9e80e15f8deab4f54a (diff) |
990513
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -1125,6 +1125,33 @@ rb_eval_string_protect(str, state) } VALUE +rb_eval_string_wrap(str, state) + const char *str; + int *state; +{ + int status; + VALUE self = ruby_top_self; + VALUE val; + + PUSH_CLASS(); + ruby_class = ruby_wrapper = rb_module_new(); + ruby_top_self = rb_obj_clone(ruby_top_self); + rb_extend_object(self, ruby_class); + + val = rb_eval_string_protect(str, &status); + ruby_top_self = self; + + POP_CLASS(); + if (state) { + if (status == 0) { + JUMP_TAG(state); + } + *state = status; + } + return val; +} + +VALUE rb_eval_cmd(cmd, arg) VALUE cmd, arg; { |