summaryrefslogtreecommitdiffhomepage
path: root/mrbgems
AgeCommit message (Collapse)Author
2019-05-25Name the return value of `mrb_range_beg_len()`dearblue
2019-05-24Fix the order of "expected" and "actual" in `mruby-time` testKOBAYASHI Shuji
2019-05-23Freeze `Rational` and `Complex` objectsKOBAYASHI Shuji
2019-05-22`Kernel#Rational` requires numeratorKOBAYASHI 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-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-19Merge pull request #4454 from shuujii/fix-Rational-cmp-NumericYukihiro "Matz" Matsumoto
Fix `Rational#<=>(Numeric)`
2019-05-19Merge pull request #4453 from shuujii/move-Kernel-instance_eval-to-BasicObjectYukihiro "Matz" Matsumoto
Move `Kernel#instance_eval` to `BasicObject`
2019-05-19Merge pull request #4450 from shuujii/move-Kernel-instance_exec-to-BasicObjectYukihiro "Matz" Matsumoto
Move `Kernel#instance_exec` to `BasicObject`
2019-05-19Should clarify the role of `mruby-kernel-ext` and `mruby-object-ext`; close ↵Yukihiro "Matz" Matsumoto
#4449 The former should contain function like methods, and the latter should contain methods shared by all objects.
2019-05-19Fix `Rational#<=>(Numeric)`KOBAYASHI Shuji
Reported by Sergey Ukrainskiy: https://github.com/mruby/mruby/commit/f5fb1307b017fb972c12b4ec4b1866d789b0ca09#r33590698
2019-05-18Move `Kernel#instance_eval` to `BasicObject`KOBAYASHI Shuji
2019-05-18Move `Kernel#instance_exec` to `BasicObject`KOBAYASHI Shuji
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 #4443 from ↵Yukihiro "Matz" Matsumoto
shuujii/move-Integral-zero-nonzero-positive-negative-to-Numeric Move `Integral#(zero|nonzero|positive|negative)?` to `Numeric`
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-17Move `Integral#(zero|nonzero|positive|negative)?` to `Numeric`KOBAYASHI Shuji
Because these methods work if object is `Comparable`, and `Numeric` is `Comparable`.
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-17Move `Numeric#div` to the core.Yukihiro "Matz" Matsumoto
2019-05-16Refactor `time.c` regarding memory allocation.Yukihiro "Matz" Matsumoto
2019-05-16Fix `Rational#==`KOBAYASHI Shuji
2019-05-16Enable `YYSTACK_USE_ALLOCA`.Yukihiro "Matz" Matsumoto
It used heap allocated memory for the parser stack, but there's possibility of parser termination by exceptions. In that case, the parser stack memory is leaked. We were afraid of stack consumption, but parser stack size is only 4KB, so we don't have to worry about it (at least for the parser).
2019-05-16Avoid potential type mismatch warnings in `pack.c`.Yukihiro "Matz" Matsumoto
2019-05-16Avoid potential integer overflow.Yukihiro "Matz" Matsumoto
2019-05-15Merge pull request #4435 from ↵Yukihiro "Matz" Matsumoto
shuujii/fix-typo-in-mrbgems-mruby-io-src-file_test.c Fix typo in `mrbgems/mruby-io/src/file_test.c` [ci skip]
2019-05-15FixUkrainskiy Sergey
2019-05-15Fix dependenciesUkrainskiy Sergey
2019-05-15Basic implementation of Complex and Rational classesUkrainskiy Sergey
2019-05-15Small refactoringUkrainskiy Sergey
2019-05-15Initial suffix supportUkrainskiy Sergey
2019-05-15Fix typo in `mrbgems/mruby-io/src/file_test.c` [ci skip]KOBAYASHI Shuji
2019-05-14Refine `Time#(to_s|inspect)`KOBAYASHI Shuji
For the following reasons: - Ruby compatibility. - Add UTC offset (time zone informations was not included by #4433). - More readable. Example: Before this patch: p Time.gm(2003,4,5,6,7,8,9) #=> Sat Apr 5 06:07:08 2003 p Time.local(2013,10,28,16,27,48) #=> Mon Oct 28 16:27:48 2013 After this patch: p Time.gm(2003,4,5,6,7,8,9) #=> 2003-04-05 06:07:08 UTC p Time.local(2013,10,28,16,27,48) #=> 2013-10-28 16:27:48 +0900 Implementation: I use `strftime(3)` because UTC offset can be added and program size become smaller than the other implementations (using `sprintf(3)`, self conversion etc) in my environment.
2019-05-13Fix `Time#(asctime|ctime)` according to ISO RubyKOBAYASHI Shuji
- A leading charactor for day is space. - Time zone does not included. Before this patch: Time.gm(1982,3,4,5,6,7).asctime #=> "Thu Mar 04 05:06:07 UTC 1982" After this patch: Time.gm(1982,3,4,5,6,7).asctime #=> "Thu Mar 4 05:06:07 1982"
2019-05-12Fix missing assertions in `mruby-time` testKOBAYASHI Shuji
2019-05-10Move `mrb_gc_arena_restore` to inside the loop in `mrb_file_s_chmod`KOBAYASHI Shuji
2019-05-10Raise `TypeError` if the argument type is unsupported in `mrb_stat0`KOBAYASHI Shuji