diff options
| author | Tom Black <[email protected]> | 2018-05-06 16:39:44 -0700 |
|---|---|---|
| committer | Tom Black <[email protected]> | 2018-05-06 16:53:21 -0700 |
| commit | 341ca5b71287ba9e6a1f2fa0065396bb997dc685 (patch) | |
| tree | e085b8e616b4d252ca54058b21fcb628e66b8308 | |
| parent | 89b931a9325db2623490bf5f99672213b600e10e (diff) | |
| download | ruby2d-341ca5b71287ba9e6a1f2fa0065396bb997dc685.tar.gz ruby2d-341ca5b71287ba9e6a1f2fa0065396bb997dc685.zip | |
Remove `File.exists?` from mruby ext
`mruby-io` is now in default gembox, no need add this anymore
| -rw-r--r-- | ext/ruby2d/ruby2d.c | 16 |
1 files changed, 0 insertions, 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 @@ -153,18 +153,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 */ #if MRUBY @@ -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 |
