summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-rational
AgeCommit message (Collapse)Author
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-18Avoid making top-level `env` in initialization code; ref #4581Yukihiro "Matz" Matsumoto
2019-06-29Use nested `assert`dearblue
2019-06-05Drop precisions for rational when big numbersdearblue
2019-06-05Fix build error if `struct mrb_rational` is bigger than `RIStruct`dearblue
In that case, to be switched implementation with `RData`. It is based to "complex".
2019-05-29Slightly simplify `Rational#==`; ref #4475Yukihiro "Matz" Matsumoto
2019-05-27Fix `Rational#==(Complex)`KOBAYASHI Shuji
Consider a Numreic class like `Complex` that does not have `<=>` but `==` works (`0i == 0r` is `true`).
2019-05-23Freeze `Rational` and `Complex` objectsKOBAYASHI Shuji
2019-05-22`Kernel#Rational` requires numeratorKOBAYASHI Shuji
2019-05-21Implements part of `Complex` class in C.Yukihiro "Matz" Matsumoto
2019-05-21Should not refer `Float` class in case of `MRB_WITHOUT_FLOAT`.Yukihiro "Matz" Matsumoto
This commit removes `Float` from `rational.c`.
2019-05-21Move `**`,`/`,`quo`,`div` and comparison methods to Integral from NumericKOBAYASHI Shuji
Having these methods in Numeric can get in the way of creating subclasses of Numeric because they only support Fixnum and Float.
2019-05-21Revert part of #4457KOBAYASHI Shuji
2019-05-21Merge pull request #4457 from ↵Yukihiro "Matz" Matsumoto
shuujii/change-the-order-of-expected-and-actual-in-mruby-rational-test Change the order of "expected" and "actual" in `mruby-rational` test
2019-05-20Drop dependency from `mruby-rational` to `mruby-object-ext`KOBAYASHI Shuji
2019-05-20Change the order of "expected" and "actual" in `mruby-rational` testKOBAYASHI Shuji
2019-05-19Fix `Rational#<=>(Numeric)`KOBAYASHI Shuji
Reported by Sergey Ukrainskiy: https://github.com/mruby/mruby/commit/f5fb1307b017fb972c12b4ec4b1866d789b0ca09#r33590698
2019-05-18Move `Object#(Rational|Complex)` to `Kernel`KOBAYASHI Shuji
2019-05-18Implement `Rational._new` in C.Yukihiro "Matz" Matsumoto
2019-05-18Support `MRB_WITHOUT_FLOAT`.Yukihiro "Matz" Matsumoto
I assume there's no realistic usage of `Rational` with `MRB_WITHOUT_FLOAT`. But just for consistency.
2019-05-17Merge pull request #4442 from ↵Yukihiro "Matz" Matsumoto
shuujii/drop-dependency-from-mruby-rational-to-mruby-numeric-ext Drop dependency from `mruby-rational` to `mruby-numeric-ext`
2019-05-17Drop dependency from `mruby-rational` to `mruby-numeric-ext`KOBAYASHI Shuji
2019-05-17Fix `Numeric#to_r`KOBAYASHI Shuji
2019-05-17Implement part of `Rational` in C.Yukihiro "Matz" Matsumoto
2019-05-17Avoid direct access to instance variables in `rational.rb`.Yukihiro "Matz" Matsumoto
2019-05-17Fixed wrong overloading.Yukihiro "Matz" Matsumoto
`float op rational` should return `float`, since float is an inexact value.
2019-05-17Use `div` (integer divition) instead of `/` for rational numbers.Yukihiro "Matz" Matsumoto
2019-05-16Fix `Rational#==`KOBAYASHI Shuji
2019-05-15Fix dependenciesUkrainskiy Sergey
2019-05-15Basic implementation of Complex and Rational classesUkrainskiy Sergey
2019-05-15Initial suffix supportUkrainskiy Sergey