| Age | Commit message (Collapse) | Author |
|
The following code was causing SIGSEGV:
```ruby
Module.method(:nesting).call
```
|
|
|
|
However, the behavior of `#call` on the method object of
`local_variables` is not corrected.
|
|
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]
```
|
|
|
|
* mrb_sym2name -> mrb_sym_name
* mrb_sym2name_len -> mrb_sym_name_len
* mrb_sym2str -> mrb_sym_str
|
|
|
|
|
|
Some error messages will be changed.
|
|
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.
|
|
|
|
shuujii/add-ISO-section-number-to-Kernel-local_variables
Add ISO section number to `Kernel.#local_variables` [ci skip]
|
|
|
|
|
|
|
|
- They are not include in Ruby.
- Appear in duplicate when `$1`-`$9` are defined.
|
|
This method is defined in `mruby-metaprog` gem.
|
|
|
|
|
|
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
|
|
|
|
- `@@?` etc are invalid class variable name.
- `@1` etc are invalid instance variable name.
|
|
|
|
|
|
But `BasicObject#__send__` is still available from the core.
|
|
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.
|