| Age | Commit message (Collapse) | Author |
|
shuujii/fix-Warn-if-assertion-is-missing-inside-assert
Fix "Warn if assertion is missing inside `assert`"; ref ff43b2b9
|
|
|
|
Fix Time#to_s encoding on Windows
|
|
strftime() on Windows returns locale encoding time zone for "%z" even
if MSDN says "%z" is "The offset from UTC in ISO 8601 format; no
characters if time zone is unknown" in MSDN:
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strftime-wcsftime-strftime-l-wcsftime-l?view=vs-2019
So we need to convert encoding of string from strftime().
|
|
|
|
shuujii/add-assert_raise_with_message-and-assert_raise_with_message_pattern
Add `assert_raise_with_message` and `assert_raise_with_message_pattern`
|
|
|
|
Remove `Enumerator::Chain#initialize_copy`
|
|
shuujii/define-plus-to-Enumerator-and-Enumerator-Chain-instead-of-Enumerable
Define `#+` to `Enumerator` and `Enumerator#Chain` instead of `Enumerable`
|
|
|
|
I think `Enumerator::Chain#initialize_copy` is unnecessary because CRuby
doesn't clone elements.
|
|
shuujii/drop-dependency-from-mruby-enumerator-to-mruby-enum-ext
Drop dependency from `mruby-enumerator` to `mruby-enum-ext`
|
|
|
|
Fix the lack of precision for `Time`; ref d74355061
|
|
shuujii/drop-dependency-from-mruby-enum-chain-to-mruby-enum-ext
Drop dependency from `mruby-enum-chain` to `mruby-enum-ext`
|
|
- `Time.local` and `Time.utc` are able to use with `MRB_INT16 + MRB_WITHOUT_FLOAT`.
- `time_t` is converted directly from the Ruby object.
- `time + sec` and` time - sec` are not affected by the precision of `mrb_float`.
Similarly, calculations are possible with `MRB_INT16 + MRB_WITHOUT_FLOAT`.
|
|
|
|
Fix mruby-time with `MRB_WITHOUT_FLOAT`; ref d74355061
|
|
Also fix the misfeature introduced in 23783a4, that ignores newlines
between method chains.
|
|
|
|
shuujii/drop-dependency-from-mruby-array-ext-to-mruby-enum-ext
Drop dependency from `mruby-array-ext` to `mruby-enum-ext`
|
|
shuujii/move-NilClass-to_h-to-mruby-object-ext-from-mruby-enum-ext
Move `NilClass#to_h` to `mruby-object-ext` from `mruby-enum-ext`
|
|
|
|
Refine `Array#(permutation|combination) test`
|
|
- No guarantees about the order in which the permutations/combinations
are yielded.
- Drop dependency on `Enumerator`.
|
|
|
|
|
|
When the size of Xorshift128 seed (`sizeof(uint32)*4`) is bigger than
ISTRUCT_DATA_SIZE, `Random` uses Xorshift96 instead.
|
|
|
|
Add encoding argument to `Integral#chr`
|
|
Currently, `Integral#chr` in mruby changes behavior by `MRB_UTF8_STRING`
setting.
before this patch:
$ bin/mruby -e 'p 171.chr' #=> "\xab" (`MRB_UTF8_STRING` is disabled)
$ bin/mruby -e 'p 171.chr' #=> "«" (`MRB_UTF8_STRING` is enabled)
This behavior is incompatible with Ruby, and a little inconvenient because
it can't be interpreted as ASCII-8BIT with `MRB_UTF8_STRING`, I think.
So add encoding argument according to Ruby.
after this patch:
$ bin/mruby -e 'p 171.chr' #=> "\xab"
$ bin/mruby -e 'p 171.chr("ASCII-8BIT")' #=> "\xab"
$ bin/mruby -e 'p 171.chr("UTF-8")' #=> "«"
Allow only `String` for encoding because mruby doesn't have `Encoding`
class, and `"ASCII-8BIT"` (`"BINARY"`) and `"UTF-8"` (only with
`MRB_UTF8_STRING`) are valid value (default is `"ASCII-8BIT"`).
|
|
shuujii/integrate-Integral-chr-Fixnum-chr-to-mruby-string-ext
Integrate `Integral#chr` (`Fixnum#chr`) to `mruby-string-ext`
|
|
Fix `Module#dup` to frozen module
|
|
Set `MRB_STR_ASCII` flag in `String#inspect`
|
|
As a side effect, `mrb_time_at()` now takes `mrb_int` instead of
`double` as time arguments.
|
|
|
|
The Complex class needs `mrb_float` so that it does not work with
`MRB_WITHOUT_FLOAT` anyway.
|
|
`String#inspect` can set `MRB_STR_ASCII` flag to receiver and return value
because it checks character byte length.
|
|
Now `rand` can be used with `MRB_WITHOUT_FLOAT`; ref #4576
|
|
|
|
Normal `TYPED_FIXABLE(f,mrb_float)` does not work on 64bit int from
casting problems. The new approach works well, but assumes two's
complement and IEEE-754 floating point numbers.
|
|
Because they're defined in both `mruby-string-ext` and `mruby-numeric-ext`
(they seem more natural to define in N, but `mruby-string-ext` depends on
`Integral#chr`).
|
|
Before this patch:
$ bin/mruby -e 'p Module.new.freeze.dup.frozen?' #=> true
After this patch (same as Ruby):
$ bin/mruby -e 'p Module.new.freeze.dup.frozen?' #=> false
|
|
Refine `String#chr` test and separate `Fixnum#chr` test
|
|
|
|
Use stack memory for small name of attr accessors
|
|
shuujii/fix-String-times-test-with-MRB_WITHOUT_FLOAT
Fix `String#*` test with `MRB_WITHOUT_FLOAT`
|
|
|
|
|
|
|