- 01 Aug, 2019 2 commits
-
-
Yukihiro "Matz" Matsumoto authored
Add new specifiers/modifiers to format string of `mrb_vfromat()`
-
KOBAYASHI Shuji authored
Format sequence syntax: %[modifier]specifier Modifiers: ----------+------------------------------------------------------------ Modifier | Meaning ----------+------------------------------------------------------------ ! | Convert to string by corresponding `inspect` instead of | corresponding `to_s`. ----------+------------------------------------------------------------ Specifiers: ----------+----------------+-------------------------------------------- Specifier | Argument Type | Note ----------+----------------+-------------------------------------------- c | char | d,i | mrb_int | f | mrb_float | l | char*, mrb_int | Arguments are string and length. n | mrb_sym | s | char* | Argument is NUL terminated string. t | mrb_value | Convert to type (class) of object. v,S | mrb_value | C | struct RClass* | T | mrb_value | Convert to real type (class) of object. Y | mrb_value | Same as `!v` if argument is `true`, `false` | | or `nil`, otherwise same as `T`. % | - | Convert to percent sign itself (no argument | | taken). ----------+----------------+-------------------------------------------- This change will increase the binary size, but replacing all format strings with new specifiers/modifiers will decrease the size because it reduces inline expansion of `mrb_obj_value()`, etc. at the caller.
-
- 31 Jul, 2019 2 commits
-
-
Yukihiro "Matz" Matsumoto authored
Merge pull request #4607 from shuujii/fix-UTC-offset-representation-in-Time-to_s-on-some-environments Fix UTC offset representation in `Time#to_s` on some environments; ref #4604
-
KOBAYASHI Shuji authored
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.
-
- 30 Jul, 2019 7 commits
-
-
Yukihiro "Matz" Matsumoto authored
`MRB_INT_MIN` is the only integer value that has no corresponding positive integer value (i.e. `-MRB_INT_MIN` = `MRB_INT_MIN`).
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
Refine message to `skip` in nested `assert`
-
KOBAYASHI Shuji authored
- 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
-
- 29 Jul, 2019 4 commits
-
-
Yukihiro "Matz" Matsumoto authored
Fix "Warn if assertion is missing inside `assert`"; ref ff43b2b9
-
KOBAYASHI Shuji authored
-
Yukihiro "Matz" Matsumoto authored
Fix Time#to_s encoding on Windows
-
Sutou Kouhei authored
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().
-
- 28 Jul, 2019 10 commits
-
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
Merge pull request #4407 from shuujii/add-assert_raise_with_message-and-assert_raise_with_message_pattern Add `assert_raise_with_message` and `assert_raise_with_message_pattern`
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
Remove `Enumerator::Chain#initialize_copy`
-
Yukihiro "Matz" Matsumoto authored
Merge pull request #4603 from shuujii/define-plus-to-Enumerator-and-Enumerator-Chain-instead-of-Enumerable Define `#+` to `Enumerator` and `Enumerator#Chain` instead of `Enumerable`
-
KOBAYASHI Shuji authored
-
KOBAYASHI Shuji authored
I think `Enumerator::Chain#initialize_copy` is unnecessary because CRuby doesn't clone elements.
-
Yukihiro "Matz" Matsumoto authored
Drop dependency from `mruby-enumerator` to `mruby-enum-ext`
-
KOBAYASHI Shuji authored
-
Yukihiro "Matz" Matsumoto authored
Fix the lack of precision for `Time`; ref d7435506
-
- 27 Jul, 2019 8 commits
-
-
Yukihiro "Matz" Matsumoto authored
Drop dependency from `mruby-enum-chain` to `mruby-enum-ext`
-
dearblue authored
- `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`.
-
KOBAYASHI Shuji authored
-
Yukihiro "Matz" Matsumoto authored
Fix mruby-time with `MRB_WITHOUT_FLOAT`; ref d7435506
-
Yukihiro "Matz" Matsumoto authored
Also fix the misfeature introduced in 23783a44, that ignores newlines between method chains.
-
dearblue authored
-
Yukihiro "Matz" Matsumoto authored
Drop dependency from `mruby-array-ext` to `mruby-enum-ext`
-
Yukihiro "Matz" Matsumoto authored
Move `NilClass#to_h` to `mruby-object-ext` from `mruby-enum-ext`
-
- 26 Jul, 2019 1 commit
-
-
KOBAYASHI Shuji authored
-
- 25 Jul, 2019 2 commits
-
-
Yukihiro "Matz" Matsumoto authored
Refine `Array#(permutation|combination) test`
-
KOBAYASHI Shuji authored
- No guarantees about the order in which the permutations/combinations are yielded. - Drop dependency on `Enumerator`.
-
- 24 Jul, 2019 4 commits
-
-
KOBAYASHI Shuji authored
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
When the size of Xorshift128 seed (`sizeof(uint32)*4`) is bigger than ISTRUCT_DATA_SIZE, `Random` uses Xorshift96 instead.
-
Yukihiro "Matz" Matsumoto authored
-