| Age | Commit message (Collapse) | Author |
|
Use own implementation to calculate UTC offset on Visual Studio 2015 or
earlier or MinGW because `strftime("%z")` on these environments does not
conform C99.
|
|
Refine message to `skip` in nested `assert`
|
|
- I think "Info" is used only to `skip`, so change to "Skip".
- Changed the default value of `assert` and specify the argument explicitly
at the caller of `assert` because it is unnatural "Assertion failed" is
output even though the assertion doesn't fail.
== Example:
def assert_foo(exp, act)
assert do
assert_equal exp[0], act[0]
assert_equal exp[1], act[1]
end
end
def assert_bar(exp, act)
assert do
skip
end
end
def assert_baz(exp, act)
assert do
assert_equal exp, act
assert_bar exp, act
end
end
assert 'test#skip_in_nested_assert' do
assert_baz 1, 1
end
=== Before this patch:
?..
Info: test#skip_in_nested_assert (core)
- Assertion[1]
Info: Assertion failed (core)
- Assertion[1-2]
Skip: Assertion failed (core)
Total: 3
OK: 2
KO: 0
Crash: 0
Warning: 0
Skip: 1
=== After this patch:
???
Skip: test#skip_in_nested_assert (core)
- Assertion[1]
Skip: assert (core)
- Assertion[1-2]
Skip: assert (core)
Total: 3
OK: 0
KO: 0
Crash: 0
Warning: 0
Skip: 3
|
|
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().
|
|
|
|
Remove `Enumerator::Chain#initialize_copy`
|
|
|
|
I think `Enumerator::Chain#initialize_copy` is unnecessary because CRuby
doesn't clone elements.
|
|
|
|
Fix the lack of precision for `Time`; ref d74355061
|
|
- `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`
|
|
|
|
- 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.
|
|
|
|
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`
|
|
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.
|
|
Now `rand` can be used with `MRB_WITHOUT_FLOAT`; ref #4576
|
|
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`).
|
|
|
|
|
|
|
|
Revert #4300
|
|
Originally, it was not necessary to change. I made mistake.
|
|
Before this patch:
$ bin/mruby -e 'p (2...4.0).min' #=> TypeError
After this patch (same as CRuby and without `mruby-range-ext`):
$ bin/mruby -e 'p (2...4.0).min' #=> 2
|
|
|
|
|
|
|
|
Error needed/conflicts configuration
|
|
|
|
For example, `"".unpack("")` evaluates to `[]`.
|
|
The pack/unpack "m" directive should be treated as a length rather than
an element count.
|
|
|
|
The purpose is to clarify the error if there is a needed/conflicts
configuration at compile time.
|
|
|
|
|
|
|
|
If no block is given and the Range has Fixnum or Float endpoints, do not iterate with
each and instead compare the endpoints directly. This implementation passes all of
the applicable specs from Ruby Spec.
|
|
|