diff options
Diffstat (limited to 'ruby_2_2/ext/-test-/exception/ensured.c')
-rw-r--r-- | ruby_2_2/ext/-test-/exception/ensured.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/ruby_2_2/ext/-test-/exception/ensured.c b/ruby_2_2/ext/-test-/exception/ensured.c deleted file mode 100644 index 365e1f4f79..0000000000 --- a/ruby_2_2/ext/-test-/exception/ensured.c +++ /dev/null @@ -1,25 +0,0 @@ -#include <ruby.h> - -static VALUE -begin(VALUE object) -{ - return rb_funcall(object, rb_intern("try_method"), 0); -} - -static VALUE -ensure(VALUE object) -{ - return rb_funcall(object, rb_intern("ensured_method"), 0); -} - -static VALUE -ensured(VALUE module, VALUE object) -{ - return rb_ensure(begin, object, ensure, object); -} - -void -Init_ensured(VALUE klass) -{ - rb_define_module_function(klass, "ensured", ensured, 1); -} |