summaryrefslogtreecommitdiffhomepage
path: root/mrbgems
AgeCommit message (Collapse)Author
2020-06-29Fix the bug that `mrbc` generates `a.rb.mrb` instead of `a.mrb`.Yukihiro "Matz" Matsumoto
The bug was introduced by 9dfe50f1d.
2020-06-25Use `snprintf` instead of `memcpy` in `mrbc.c`.Yukihiro "Matz" Matsumoto
2020-06-25Change flag names in preparation of `REnv` refactoring.Yukihiro "Matz" Matsumoto
2020-06-25Use `mrb_get_argc()` to improve performance.Yukihiro "Matz" Matsumoto
2020-06-20Fix potential buffer overflow in `sprintf.c`.Yukihiro "Matz" Matsumoto
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
2020-06-15Remove unused `MRB_TT_FILE`.Yukihiro "Matz" Matsumoto
2020-06-11Merge pull request #5023 from dearblue/nestingYukihiro "Matz" Matsumoto
Remove `mrb_assert()` in `Module.nesting`
2020-06-09Update `OP_HASH` generation to support big hash creation.Yukihiro "Matz" Matsumoto
2020-06-09Remove `mrb_assert()` in `Module.nesting`dearblue
The following code was causing SIGSEGV: ```ruby Module.method(:nesting).call ```
2020-06-09Need `build/XXX/mrbgems/mruby-test` directorydearblue
An error may occur when performing `rake clean all` or `rake clean test`. The directory is needed before writing to `mrbgems/mruby-test/assert.c`.
2020-06-05Revert part of #5019 (`mruby_io_test.c`) to honor #4987Yukihiro "Matz" Matsumoto
The issue was reported by @shuujii.
2020-06-05Add proper casts to silence VC warnings.Yukihiro "Matz" Matsumoto
2020-06-05Change arena index from `mrb_int` to `int`.Yukihiro "Matz" Matsumoto
2020-06-05Merge master.Hiroshi Mimaki
2020-06-04Add explicit cast to `DROP_PRECISION` macro in `rtional.c`.Yukihiro "Matz" Matsumoto
2020-06-04Add `mruby-complex` and `mruby-rational` to `default.gembox`.Yukihiro "Matz" Matsumoto
2020-06-04Add explicit cast to silence warnings on AppVeyor.Yukihiro "Matz" Matsumoto
2020-06-03Hiding method implementation C functions in mruby-iodearblue
2020-06-03Merge pull request #4800 from ↵Yukihiro "Matz" Matsumoto
shuujii/set-MRB_STR_ASCII-flag-to-some-stringize-methods Set `MRB_STR_ASCII` flag to some stringize methods
2020-06-02Remove `patch_irep()` in `mruby-eval`dearblue
- It can now deal with operands in the range of `OP_EXT*`. - It can now call the same method as the variable name without arguments. ```ruby def a "Safe!" end a = "Auto!" eval "a()" # call method `a` ```
2020-06-01Add `mruby-eval` to `default.gembox`.Yukihiro "Matz" Matsumoto
2020-05-31Get local variable names from orphan block; ref #3710dearblue
2020-05-27Move `fmt_setup` until absolutely necessary.Yukihiro "Matz" Matsumoto
2020-05-26Integer format can be bigger than `32` on 64bit platforms.Yukihiro "Matz" Matsumoto
We made it `64` which should be big enough: - Format modifier: 4 characters max - Maximum width: 19 digits max - Period between width and precision: 1 character - Maximum precision: 19 digits max - Format specifier: 1 character - NUL terminator: 1 byte - Total: 45 < 64
2020-05-25Add `y.tab.c` to remove Bison from build dependencies; ref 4ce3997cKOBAYASHI Shuji
I sometimes see Bison related problems in setting up build environments. Therefore to remove Bison from build time dependencies, add `y.tab.c` generated by Bison to the repository. The reduction of dependency at build time also reduces the labor and time for setup and installation in CI. In addition, a path in `#line` directive is converted to a relative path so that its path is constant regardless of development environments.
2020-05-15Rename C function `mrb_proc_lambda`.Yukihiro "Matz" Matsumoto
2020-05-15Add `pread/pwrite` support on `__MACH__` (MacOS) in addition to `__unix__`.Yukihiro "Matz" Matsumoto
2020-05-15Remove `YYERROR_VERBOSE` which no longer supported since `bison 3.6`.Yukihiro "Matz" Matsumoto
Instead we added `%define parse.error verbose`.
2020-05-11Make `off_t` handling simpler; #4872 #4939Yukihiro "Matz" Matsumoto
The newer `clang` warns implicit float conversions.
2020-05-09Fix boundary check for `OP_LOADI16`; ref fa8668cdearblue
It was making a negative integer if the highest-order bit of a 16-bit integer was 1. no patched: ```ruby p 0x7fff # => 32767 p 0x8000 # => -32768 p 0xffff # => -1 p 0x10000 # => 65536 ```
2020-05-07Remove unnecessary `sprintf` test that fails since 91368c1.Yukihiro "Matz" Matsumoto
2020-05-07Should not use `assert` with expressions with side-effect; ref #49812.1.1-rc2Yukihiro "Matz" Matsumoto
`assert()` can be completely removed when `NDEBUG` is set.
2020-05-07Fixed wrong condition in #4981.Yukihiro "Matz" Matsumoto
2020-05-07Add `#include <string.h>` on all platforms for `strncpy`; #4981Yukihiro "Matz" Matsumoto
2020-05-07Remove unused local variable if `MRB_UTF8_STRING` is not set.Yukihiro "Matz" Matsumoto
Ref #4982 #4983
2020-05-07Avoid `snprintf` in `mruby-io` test; ref #4981Yukihiro "Matz" Matsumoto
2020-05-07Remove the temporary file from the `AF_UNIX` socket test; #4981Yukihiro "Matz" Matsumoto
2020-05-07Fix `IO#readchar` to return broken UTF-8 rather than `EOF` error.Yukihiro "Matz" Matsumoto
The behavior is different from CRuby, but we believe this is a right behavior for mruby, which only supports either ASCII or UTF-8 exclusively; fix #4983, ref #4982 ``` $ printf '\xe3\x81' | ruby -e 'p STDIN.readchar' "\xE3\x81" ``` ``` $ printf '\xe3\x81' | mruby -e 'p STDIN.readchar' "\xE3" ```
2020-05-07Fix `IO#readchar` to support UTF-8 char reading; fix #4712Yukihiro "Matz" Matsumoto
This fix only effective when `MRB_UTF8_STRING` is set.
2020-05-07Rename (and expose) UTF-8 related functions; ref #4712Yukihiro "Matz" Matsumoto
- mrb_utf8len() - returns the size of a UTF-8 char (in bytes) - mrb_utf8_strlen() - returns the length of a UTF-8 string (in char)
2020-05-07Avoid `mrb_funcall` if `MRB_UFT8_STRING` is not set.Yukihiro "Matz" Matsumoto
2020-05-07Remove `-e/-E` options from `mrbc`.Yukihiro "Matz" Matsumoto
You don't have to specify endian since `mruby 2.0`.
2020-05-07Add a new instruction `OP_LOADI16`.Yukihiro "Matz" Matsumoto
Which loads 16bit integer to the register. The instruction number should be reorder on massive instruction refactoring. The instruction is added for `mruby/c` which had performance issue with `OP_EXT`. With this instruction, `mruby/c` VM can just raise errors on `OP_EXT` extension instructions.
2020-05-07Fix wrong line number before comment line; fix #4993Yukihiro "Matz" Matsumoto
2020-05-07Add assertion as originally intended; ref #4986Yukihiro "Matz" Matsumoto
2020-05-01Fix `_read_buf` to be more efficient; fix #4982Yukihiro "Matz" Matsumoto
The bug was introduced by #4712. The `getc' problem resurrected. It should be addressed soon.
2020-05-01Fix `IO#sysread` to update buffer string on `EOF`; ref #4982Yukihiro "Matz" Matsumoto
2020-05-01Update `IO#ungetc` to keep `@buf` string; ref #4982Yukihiro "Matz" Matsumoto