summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2019-05-17Remove unused `mrb_num_div()` function.Yukihiro "Matz" Matsumoto
2019-05-17Move `Numeric#div` to the core.Yukihiro "Matz" Matsumoto
2019-05-17Make `flo_rount` to return `Integeral`.Yukihiro "Matz" Matsumoto
2019-05-17Change the `num.divmod(float)` to return `[int,num]`.Yukihiro "Matz" Matsumoto
2019-05-17Add a new function `mrb_int_value`.Yukihiro "Matz" Matsumoto
This function returns `Fixnum` if the value fits in `mrb_int`, otherwise it returns `Float` value (mruby behavior of handling integers).
2019-05-17Use `int64_t` instead of `mrb_int` in `int64_value`.Yukihiro "Matz" Matsumoto
2019-05-17Use `mrb_float` instead of `double` in `FIXABLE_FLOAT`.Yukihiro "Matz" Matsumoto
2019-05-16Refactor `time.c` regarding memory allocation.Yukihiro "Matz" Matsumoto
2019-05-16Merge pull request #4439 from shuujii/fix-Rational-eqYukihiro "Matz" Matsumoto
Fix `Rational#==`
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-16Set maximum string (and symbol) size to 65534 (`UINT16_MAX-1`).Yukihiro "Matz" Matsumoto
The previous value (`UINT16_MAX`) was too long for symbols, so it raises an exception after the length check.
2019-05-16Avoid potential type mismatch warnings in `pack.c`.Yukihiro "Matz" Matsumoto
2019-05-16Avoid potential integer overflow.Yukihiro "Matz" Matsumoto
2019-05-16Terminate float right shift if shift value is too big.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-15Do not overwrite `conf.cc.defines`.Yukihiro "Matz" Matsumoto
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-15Merge pull request #4400 from ↵Yukihiro "Matz" Matsumoto
shuujii/fix-name-assignment-to-frozen-anonymous-class-module Fix name assignment to frozen anonymous class/module
2019-05-15Add Enumerator support to `String#each_byte`.Yukihiro "Matz" Matsumoto
`String#each_byte` is not defined in ISO Ruby but it is implemented in the core mruby because it's useful.
2019-05-15Merge pull request #4434 from shuujii/refine-Time-to_s-inspectYukihiro "Matz" Matsumoto
Refine `Time#(to_s|inspect)`
2019-05-15Remove `String#=~` and `String#match` that requires `Regexp`.Yukihiro "Matz" Matsumoto
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-14Merge pull request #4433 from ↵Yukihiro "Matz" Matsumoto
shuujii/fix-Time-asctime-ctime-according-to-ISO-Ruby Fix `Time#(asctime|ctime)` according to ISO Ruby
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-13Merge pull request #4432 from shuujii/fix-missing-assertions-in-mruby-time-testYukihiro "Matz" Matsumoto
Fix missing assertions in `mruby-time` test
2019-05-12Fix missing assertions in `mruby-time` testKOBAYASHI Shuji
2019-05-12Merge pull request #4431 from shuujii/use-mrb_ensure_string_type-in-mrb_to_strYukihiro "Matz" Matsumoto
Use `mrb_ensure_string_type` in `mrb_to_str`
2019-05-11Use `mrb_ensure_string_type` in `mrb_to_str`KOBAYASHI Shuji
2019-05-11Merge pull request #4430 from bshastry/ossfuzzYukihiro "Matz" Matsumoto
Update ossfuzz options
2019-05-11Merge pull request #4429 from ↵Yukihiro "Matz" Matsumoto
shuujii/move-mrb_gc_arena_restore-into-loop-in-mrb_file_s_chmod Move `mrb_gc_arena_restore` to inside the loop in `mrb_file_s_chmod`
2019-05-10Update ossfuzz optionsBhargava Shastry
2019-05-10Move `mrb_gc_arena_restore` to inside the loop in `mrb_file_s_chmod`KOBAYASHI Shuji
2019-05-10Merge pull request #4428 from ↵Yukihiro "Matz" Matsumoto
shuujii/raise-TypeError-if-the-argument-type-is-unsupported-in-mrb_stat0 Raise `TypeError` if the argument type is unsupported in `mrb_stat0`
2019-05-10Raise `TypeError` if the argument type is unsupported in `mrb_stat0`KOBAYASHI Shuji
2019-05-08Update `README.md`; mruby is now Ruby 2.x compatible.Yukihiro "Matz" Matsumoto
2019-05-08Merge pull request #4426 from ↵Yukihiro "Matz" Matsumoto
shuujii/use-mrb_string_value_cstr-in-mrb_str_to_dbl Use `mrb_string_value_cstr` in `mrb_str_to_dbl`
2019-05-08Use `mrb_string_value_cstr` in `mrb_str_to_dbl`KOBAYASHI Shuji
2019-05-08Merge pull request #4425 from ↵Yukihiro "Matz" Matsumoto
shuujii/refactor-mrb_str_to_cstr-and-mrb_string_value_cstr Refactor `mrb_str_to_cstr` and `mrb_string_value_cstr`
2019-05-07Refactor `mrb_str_to_cstr` and `mrb_string_value_cstr`KOBAYASHI Shuji
- Extract null byte check to function. - Avoid string allocation if null byte is included. - Use `str_new` instead of `mrb_str_dup` + `mrb_str_modify`
2019-05-07Merge pull request #4424 from shuujii/avoid-using-mrb_str_to_cstr-if-possibleYukihiro "Matz" Matsumoto
Avoid using `mrb_str_to_cstr` if possible
2019-05-06Avoid using `mrb_str_to_cstr` if possibleKOBAYASHI Shuji
Because it always allocate new string. Replace with the followings: - Use `RSRING_PTR` if string is guaranteed to be null-terminated. - Use `mrb_string_value_cstr` or `mrb_get_args("z")` if return value isn't modified.
2019-05-05Merge pull request #4423 from ↵Yukihiro "Matz" Matsumoto
shuujii/use-mrb_fixnum_to_str-instead-of-Fixnum-to_s Use `mrb_fixnum_to_str()` instead of `Fixnum#to_s`
2019-05-05Use `mrb_fixnum_to_str()` instead of `Fixnum#to_s`KOBAYASHI Shuji
2019-05-04Merge pull request #4179 from bshastry/ossfuzzYukihiro "Matz" Matsumoto
ossfuzz: Add simple mruby compile test harness