From 341ca5b71287ba9e6a1f2fa0065396bb997dc685 Mon Sep 17 00:00:00 2001 From: Tom Black Date: Sun, 6 May 2018 16:39:44 -0700 Subject: Remove `File.exists?` from mruby ext `mruby-io` is now in default gembox, no need add this anymore --- ext/ruby2d/ruby2d.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/ext/ruby2d/ruby2d.c b/ext/ruby2d/ruby2d.c index 24c3857..888c053 100644 --- a/ext/ruby2d/ruby2d.c +++ b/ext/ruby2d/ruby2d.c @@ -152,18 +152,6 @@ double normalize_controller_axis(int val) { } -/* - * File#exists? for MRuby - */ -#if MRUBY -static R_VAL file_exists(mrb_state* mrb, R_VAL self) { - mrb_value path; - mrb_get_args(mrb, "o", &path); - return S2D_FileExists(RSTRING_PTR(path)) ? R_TRUE : R_FALSE; -} -#endif - - /* * Ruby2D::Triangle#ext_render */ @@ -1009,10 +997,6 @@ int main() { // Load the Ruby 2D library mrb_load_irep(mrb, ruby2d_lib); - // Add missing MRuby classes, methods - R_CLASS file_class = mrb_define_class(mrb, "File", mrb->object_class); - mrb_define_class_method(mrb, file_class, "exists?", file_exists, r_args_req(1)); - #else /* * Ruby C extension init -- cgit v1.2.3