summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-complex
AgeCommit message (Collapse)Author
2020-06-20Add `mrb_get_arg1()` that retrieves single (and only) argument.Yukihiro "Matz" Matsumoto
`mrb_get_arg1()` raises `ArgumentError` if the method does not receive one argument. And replaces all `mrb_get_args(mrb, "o", &arg)` by the new function.
2020-06-20Symbolify saved alias name to improve performance.Yukihiro "Matz" Matsumoto
2019-12-15Drop dependencies from `mruby-complex` to some gemsKOBAYASHI Shuji
2019-08-09Avoid overflow and underflow in Complex#/Ray Chason
2019-08-08Implement Complex#abs in terms of Math.hypotRay Chason
Math.hypot avoids premature overflow and underflow
2019-08-05Use new specifiers/modifiers of `mrb_vfromat()`KOBAYASHI Shuji
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.
2019-07-30Refine message to `skip` in nested `assert`KOBAYASHI Shuji
- 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
2019-07-24Call `MRB_SET_INSTANCE_TT` for `Complex` and `Rational`.Yukihiro "Matz" Matsumoto
2019-07-22Check conflicts with `Complex` and `MRB_WITHOUT_FLOAT`; ref #4576Yukihiro "Matz" Matsumoto
The Complex class needs `mrb_float` so that it does not work with `MRB_WITHOUT_FLOAT` anyway.
2019-07-18Avoid making top-level `env` in initialization code; ref #4581Yukihiro "Matz" Matsumoto
2019-07-13Resolve ambiguous argument warning.Yukihiro "Matz" Matsumoto
2019-06-29Use nested `assert`dearblue
2019-06-05Fix not frozen in `Complex` method by `RData`dearblue
Object allocation was separated, and initialization was made common.
2019-06-05Fix memory leak in `Complex` method by `RData`dearblue
If `Data_Wrap_Struct()` raises a `NoMemoryError` exception, it will leak memory if it does `mrb_malloc()` first.
2019-05-26Add `Complex.rect`KOBAYASHI Shuji
2019-05-26Remove some overhead from methods defined in Ruby in Complex.Yukihiro "Matz" Matsumoto
2019-05-23Freeze `Rational` and `Complex` objectsKOBAYASHI Shuji
2019-05-21Use `MRB_TT_ISTRUCT` for `Complex` numbers if possible.Yukihiro "Matz" Matsumoto
2019-05-21Implements part of `Complex` class in C.Yukihiro "Matz" Matsumoto
2019-05-21Remove `Complex(string)` complex generation.Yukihiro "Matz" Matsumoto
It should raise an error.
2019-05-18Move `Object#(Rational|Complex)` to `Kernel`KOBAYASHI Shuji
2019-05-15Fix dependenciesUkrainskiy Sergey
2019-05-15Basic implementation of Complex and Rational classesUkrainskiy Sergey
2019-05-15Initial suffix supportUkrainskiy Sergey