12 Commits

Author SHA1 Message Date
dearblue a196d8a5f3 Fixed also argument forwarding in class_exec
Pointed out by @matz.
https://github.com/mruby/mruby/pull/6391#issuecomment-2433662139
2024-10-24 22:05:59 +09:00
Yukihiro "Matz" Matsumoto 990d41f9f7 mruby-class-ext: new method attached_object introduced in Ruby3.2 2022-12-09 17:30:17 +09:00
Yukihiro "Matz" Matsumoto f0af96c130 mruby-class-ext: add Class#subclasses method. 2022-02-01 22:37:49 +09:00
Yukihiro "Matz" Matsumoto 7624e23426 Revert part of #4758 to reduce number of tests.
More tests, more time.
2019-10-09 10:29:04 +09:00
KOBAYASHI Shuji fb103c1319 Implement Ruby2.7's frozen strings from Module#name 2019-10-08 17:34:13 +09:00
Rob e300ac8e3a Adds Module#< and Module#<= 2018-12-02 20:56:47 -05:00
Yukihiro "Matz" Matsumoto e471d37ca5 Separate meta-programming features to mruby-metaprog gem.
We assume meta-programming is less used in embedded environments.
We have moved following methods:

 * Kernel module
   global_variables, local_variables, singleton_class,
   instance_variables, instance_variables_defined?, instance_variable_get,
   instance_variable_set, methods, private_methods, public_methods,
   protected_methods, singleton_methods, define_singleton_methods

 * Module class
   class_variables, class_variables_defined?, class_variable_get,
   class_variable_set, remove_class_variable, included_modules,
   instance_methods, remove_method, method_removed, constants

 * Module class methods
   constants, nesting

Note:
Following meta-programming methods are kept in the core:

 * Module class
   alias_method, undef_method, ancestors, const_defined?, const_get,
   const_set, remove_const, method_defined?, define_method

 * Toplevel object
   define_method

`mruby-metaprog` gem is linked by default (specified in default.gembox).
When it is removed, it will save 40KB (stripped:8KB) on x86-64
environment last time I measured.
2018-08-30 22:30:36 +09:00
Yukihiro "Matz" Matsumoto 8d7e95282c Add #module_exec and #class_exec in mruby-class-ext gem. 2017-12-23 10:01:30 +09:00
Yukihiro "Matz" Matsumoto ca2cfc6fe9 Merge pull request #3746 from christopheraue/mod_singleton_class_p
Implemented Module#singleton_class?
2017-07-19 09:08:11 +09:00
Christopher Aue 468cc34c93 Fixed Module#to_s and #name for #const_set modules 2017-07-18 22:55:37 +02:00
Christopher Aue dd52b88101 implemented Module#singleton_class? 2017-07-18 20:47:05 +02:00
Yukihiro "Matz" Matsumoto 01dddaf385 rename mruby-module-ext to mruby-class-ext; ref #2470 2016-11-13 16:17:44 +09:00