summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-metaprog/test
AgeCommit message (Collapse)Author
2021-06-03add a few regressions test from #2313Yukihiro "Matz" Matsumoto
The code was contributed from Carson McDonald (@carsonmcdonald)
2021-02-20metaprog.c: fix a `methods()` bug with `false` argument; fix #5351Yukihiro "Matz" Matsumoto
2020-10-12Integrate `Fixnum` class into `Integer` classdearblue
* The `Fixnum` constant is now an alias for the `Integer` class. * Remove `struct mrb_state::fixnum_class` member. If necessary, use `struct mrb_state::integer_class` instead.
2020-05-31Get local variable names from orphan block; ref #3710dearblue
2019-06-27Add modification tests for immediate valueKOBAYASHI Shuji
2019-06-21Move `Kernel#__send__` test to core from `mruby-metaprog`KOBAYASHI Shuji
2019-06-16Fix cvar, ivar, const and method can be removed to frozen objectKOBAYASHI Shuji
2019-06-10`Kernel#global_variables` should not include undefined `$1`-`$9`KOBAYASHI Shuji
- They are not include in Ruby. - Appear in duplicate when `$1`-`$9` are defined.
2019-06-07Remove `Kernel#global_variables` from coreKOBAYASHI Shuji
This method is defined in `mruby-metaprog` gem.
2019-04-25Singleton class of frozen object should be frozenKOBAYASHI Shuji
Before this patch: p (class << Object.new.freeze; self end).frozen? #=> false sc = class << (o=Object.new); self end; o.freeze; p sc.frozen? #=> false After this patch / Ruby: p (class << Object.new.freeze; self end).frozen? #=> true sc = class << (o=Object.new); self end; o.freeze; p sc.frozen? #=> true
2019-04-24Fix modiying class variable to frozen class/moduleKOBAYASHI Shuji
2019-03-17Fix class/instance variable name validationKOBAYASHI Shuji
- `@@?` etc are invalid class variable name. - `@1` etc are invalid instance variable name.
2019-02-19Use more appropriate assertion methodsKOBAYASHI 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.