From 6c1c2041ef81ea1ba3e96c93c40bfdf9fbc26602 Mon Sep 17 00:00:00 2001 From: dearblue Date: Mon, 21 Dec 2020 21:45:37 +0900 Subject: Take advantage of gembox I think that it is easy to use if it is divided according to the type of library and the general purpose. It is a subdivision from the previous `default.gembox`. By type gembox: - `stdlib`: Add some standard Ruby methods not provided by core. - `stdlib-ext`: Add some standard Ruby methods that are not provided by `stdlib`. - `stdlib-io`: Provides `IO`, `File`, `Socket`, `print`, etc. Conflict with `MRB_NO_STDIO` - `math`: Add a class related to math. Conflict with `MRB_NO_FLOAT` - `metaprog`: Adds features related to metaprogramming. Purpose gembox: - `default.gembox`: Import the same gems as before - `default-no-stdio.gembox`: Import the` stdlib` and `math` - `default-no-fpu.gembox`: Import the` stdlib` only --- mrbgems/stdlib-ext.gembox | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 mrbgems/stdlib-ext.gembox (limited to 'mrbgems/stdlib-ext.gembox') diff --git a/mrbgems/stdlib-ext.gembox b/mrbgems/stdlib-ext.gembox new file mode 100644 index 000000000..2177dca36 --- /dev/null +++ b/mrbgems/stdlib-ext.gembox @@ -0,0 +1,18 @@ +# It also works with MRB_NO_STDIO and MRB_NO_FLOAT. + +MRuby::GemBox.new do |conf| + # Use standard Array#pack, String#unpack methods + conf.gem :core => "mruby-pack" + + # Use standard Kernel#sprintf method + conf.gem :core => "mruby-sprintf" + + # Use standard Time class + conf.gem :core => "mruby-time" + + # Use standard Struct class + conf.gem :core => "mruby-struct" + + # Use Random class + conf.gem :core => "mruby-random" +end -- cgit v1.2.3