summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-metaprog/src
AgeCommit message (Collapse)Author
2020-03-30Fix NULL pointer dereferences in mrb_local_variables; fix #4955dearblue
However, the behavior of `#call` on the method object of `local_variables` is not corrected.
2019-12-14Fix for `#methods` to include methods that were `undef`dearblue
If `#methods` traverse the super class, it includes the methods that were does `undef` in the subclass. Before patched: ```terminal % bin/mruby -e 'p Module.instance_methods - Class.instance_methods' [] ``` After patched: ```terminal % bin/mruby -e 'p Module.instance_methods - Class.instance_methods' [:append_features, :extend_object] ```
2019-11-15Fix argument specs to `Kernel`KOBAYASHI Shuji
2019-09-25Rename symbol-to-string functions; close #4684Yukihiro "Matz" Matsumoto
* mrb_sym2name -> mrb_sym_name * mrb_sym2name_len -> mrb_sym_name_len * mrb_sym2str -> mrb_sym_str
2019-09-20Add optional argument to `Module#class_variables`.Yukihiro "Matz" Matsumoto
2019-09-18Remove `mrb_get_args(mrb, "")`; ref 30f37872KOBAYASHI Shuji
2019-09-16Entrust "no block given" error to `mrb_get_args()`dearblue
Some error messages will be changed.
2019-08-05Use new specifiers/modifiers of `mrb_vfromat()`KOBAYASHI Shuji
The binary sizes (gems are only `mruby-bin-mruby`) are reduced slightly in my environment than before the introduction of new specifiers/modifiers (5116789a) with this change. ------------+-------------------+-------------------+-------- BINARY | BEFORE (5116789a) | AFTER (This PR) | RATIO ------------+-------------------+-------------------+-------- mruby | 593416 bytes | 593208 bytes | -0.04% libmruby.a | 769048 bytes | 767264 bytes | -0.23% ------------+-------------------+-------------------+-------- BTW, I accidentally changed `tasks/toolchains/visualcpp.rake` at #4613, so I put it back.
2019-06-20Add ISO section number to `Kernel.#local_variables` [ci skip]KOBAYASHI Shuji
2019-06-16Fix cvar, ivar, const and method can be removed to frozen objectKOBAYASHI Shuji
2019-06-07Remove `Kernel#global_variables` from coreKOBAYASHI Shuji
This method is defined in `mruby-metaprog` gem.
2019-05-27Make some functions static in `mrbgems/mruby-metaprog/src/metaprog.c`KOBAYASHI Shuji
2019-05-26Move `mrb_mod_s_nesting()` to `mruby-metaprog` gem from the coreKOBAYASHI Shuji
2019-03-17Fix class/instance variable name validationKOBAYASHI Shuji
- `@@?` etc are invalid class variable name. - `@1` etc are invalid instance variable name.
2019-03-11Reduce `String` creation in `check_(cv|const)_name_sym`KOBAYASHI Shuji
2018-09-01Move `Kernel#send` to `mruby-metaprog` gem.Yukihiro "Matz" Matsumoto
But `BasicObject#__send__` is still available from the core.
2018-08-30Separate meta-programming features to `mruby-metaprog` gem.Yukihiro "Matz" Matsumoto
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.