| Age | Commit message (Collapse) | Author |
|
|
|
shuujii/exception-initialize-should-not-allow-two-or-more-arguments
`Exception#initialize` should not allow two or more arguments
|
|
|
|
shuujii/fix-Fixnum-overflow-test-in-Integer-lshift-test
Fix `Fixnum` overflow test in `Integer#<<` test
|
|
- Skip when `MRB_WITHOUT_FLOAT` is defined.
- Make `Fixnum` overflow even when `MRB_INT64` is defined.
|
|
shuujii/implement-all-type-predicate-macros-for-MRB_WORD_BOXING
Implement all type predicate macros for `MRB_WORD_BOXING`
|
|
The default implementations of type predicate macros use `mrb_type`.
But `mrb_type` with `MRB_WORD_BOXING` isn't very efficient, so the new
implementations avoid `mrb_type`.
|
|
Rename MRB_USE_ETEXT_EDATA to MRB_USE_LINK_TIME_RO_DATA_P and support lld linked programs
|
|
linked programs
In lld linked programs, .rodata comes before .text, thus mrb_ro_data_p
will return false for strings in .rodata. Change the lower bound from
_etext to __ehdr_start to catch these cases. This works for ld.bfd, gold
and lld, and it does not have false positives even if .init_array does
not exist.
Remove the branch that uses _edata: strings in .data can be modified so
this is semantically incorrect. Delete the __APPLE__ branch (its
manpages say get_etext() and get_edata() are strongly discouraged).
.init_array has been adopted by most ELF platforms to supersede .ctors.
Neither _etext nor _edata is used, so rename MRB_USE_ETEXT_EDATA to
MRB_USE_EHDR_START.
|
|
shuujii/use-mrb_define_method-instead-of-mrb_define_alias
Use `mrb_define_method` instead of `mrb_define_alias`
|
|
|
|
Singleton class definition do not introduce its own class variable scope
in CRuby/JRuby. So should mruby.
```
module Mod1
class << Object.new
C = 1
@@cv = 1
p Module.nesting, # => [#<Class:#<Object:0x55cb16e60a50>>, Mod1]
constants, # => [:C]
class_variables, # => []
Mod1.class_variables # => [:@@cv]
end
end
```
|
|
|
|
Fix typo in `Array#difference` document [ci skip]
|
|
|
|
Simplify arguments check in `String#index`
|
|
Also fix document about type of the first argument.
|
|
Fix `Enumerable#filter_map` without block; ref d380c7d2
|
|
|
|
Remove `mrb_get_args(mrb, "")`; ref 30f37872
|
|
|
|
We needed to preserve the original method name somewhere. We kept it in
the `env` structure pointed from aliased methods. #1457 and #1531 tried
to address this issue. But this patch is more memory efficient.
Limitation: this fix does not support `super` from methods defined by
`define_method`. This limitation may be addressed in the future, but
it's low priority.
|
|
Fix `Fixnum#(to_s|inspect)` argument specs
|
|
Before this patch:
$ bin/mruby -e 'p 3.to_s(2)'
trace (most recent call last):
[0] -e:1
-e:1: 'to_s': wrong number of arguments (1 for 0) (ArgumentError)
After this patch:
$ bin/mruby -e 'p 3.to_s(2)'
"11"
|
|
Shrink `mrb_get_args()`
|
|
Entrust "no block given" error to `mrb_get_args()`
|
|
Fix argument specs to `Enumerable`
|
|
Some error messages will be changed.
|
|
As a side effect, all specifiers now accept the `!` modifier.
|
|
In terms of specifiers, argv is never referenced after a method call as
shown in #3090.
Reduction of object code can be expected.
If you need to refer to argv after a method call in the same loop,
update argv after the method call.
|
|
`Enumerator#size` is not supported [ci skip]
|
|
|
|
`MRB_METHOD_TABLE_INLINE` was fragile. It requires `-falign-functions=n`.
On platform that uses higher bits of function pointers, you can use new
`MRB_METHOD_T_STRUCT` configuration macro.
|
|
This is partial `aspec` check that only checks `MRB_ARGS_NONE()`.
|
|
|
|
So you don't need `-falign-functions=2` anymore. Instead your platform
must not use higher bits of the pointer (true for most platforms).
If not, you have to use `struct mrb_method_t` version.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Character (multi-byte UTF-8) is destroyed when character spanning
`IO::BUF_SIZE` (4096 bytes) exist.
- Prepare file:
```ruby
File.open("sample", "wb") { |f| f << "●" * 1370 }
```
- Before patched:
```ruby
File.open("sample") { |f| a = []; while ch = f.getc; a << ch; end; p a }
# => ["●", "●", ..., "●", "\xe2", "\x97", "\x8f", "●", "●", "●", "●"]
- After patched:
```ruby
File.open("sample") { |f| a = []; while ch = f.getc; a << ch; end; p a }
# => ["●", "●", ..., "●", "●", "●", "●", "●", "●"]
|
|
|
|
|
|
`IO#readline` and `IO#readchar` process in character units.
|
|
Support parsing a Regexp literal with 'o' option
|
|
shuujii/refactor-mrb_type-in-include-mruby-boxing_word.h
Refactor `mrb_type` in `include/mruby/boxing_word.h`
|