summaryrefslogtreecommitdiffhomepage
path: root/mrbgems
AgeCommit message (Collapse)Author
2021-06-20Added `MRB_OBJ_ALLOC()` macro that does not require a castdearblue
The `MRB_OBJ_ALLOC()` macro function returns a pointer of the type corresponding to the constant literal defined in `enum mrb_vtype`.
2021-06-19Merge branch 'dearblue-block_given'Yukihiro "Matz" Matsumoto
2021-06-19codegen.c: stop `uninitialized` warning.Yukihiro "Matz" Matsumoto
2021-06-19Added `MRB_API` function to get block arguments info.dearblue
- ` mrb_block_given_p()` -- The name comes from CRuby's `rb_block_given_p ()` At the same time, it applies to `f_instance_eval()` and `f_class_eval()` of `mruby-eval`.
2021-06-16Merge pull request #5445 from jbampton/add-codespell-pre-commit-hookYukihiro "Matz" Matsumoto
Run pre-commit with GitHub Actions
2021-06-16eval.c: implement `class_eval` with string; close #5478Yukihiro "Matz" Matsumoto
2021-06-16Run pre-commit with GitHub ActionsJohn Bampton
Running pre-commit with GitHub Actions now gives us more tests and coverage Remove duplicate GitHub Actions for merge conflicts and trailing whitespace Remove duplicate checks for markdownlint and yamllint from the GitHub Super-Linter Add new custom pre-commit hook running with a shell script to sort alphabetically and uniquify codespell.txt Add new pre-commit hook to check spelling with codespell https://github.com/codespell-project/codespell Fix spelling
2021-06-14pack.c: support `w' directive (BER integer compression).Yukihiro "Matz" Matsumoto
2021-06-13pack.c: `count` should not be negative for directives `xX@`.Yukihiro "Matz" Matsumoto
2021-06-13pack.c: raise error for unsupported `w` directive.Yukihiro "Matz" Matsumoto
2021-06-12pack.c: support `@' directive (absolute position).Yukihiro "Matz" Matsumoto
2021-06-12pack.c: refactor pack/unpack 'X'.Yukihiro "Matz" Matsumoto
2021-06-12pack.c: add `X` directive (back up byte).Yukihiro "Matz" Matsumoto
2021-06-12pack.c: `count` should be always positive. no check needed.Yukihiro "Matz" Matsumoto
2021-06-12pack.c: fix `long/int` mixtures.Yukihiro "Matz" Matsumoto
2021-06-12pack.c: remove unused arguments from static functions.Yukihiro "Matz" Matsumoto
2021-06-12pack.c: wrong position after count read.Yukihiro "Matz" Matsumoto
2021-06-11codegen.c: refactor `readint()`Yukihiro "Matz" Matsumoto
* renamed from redundant `readint_mrb_int()` * supports only base upto 16 * no base validation (already done in parser) * no negative read (negate after read) * overflow detection using `mrb_int_{mul,add}_overflow()`
2021-06-11readint.c: add new function `mrb_int_read`.Yukihiro "Matz" Matsumoto
Difference from `strtoul(3)`: * reads `mrb_int` based on configuration * specifies the end of the string * no sign interpretation * base 10 only
2021-06-10sprintf.c: check value range before type casting.Yukihiro "Matz" Matsumoto
2021-06-07sprintf.c: fix `mrb_int` and `int` mixture errors.Yukihiro "Matz" Matsumoto
2021-06-07pack.c: fix 'void*` to `char*` assignment.Yukihiro "Matz" Matsumoto
2021-06-07pack.c: add `default` to `switch` statement to silence warnings.Yukihiro "Matz" Matsumoto
2021-06-07pack.c: support `M` specifier (quoted-printable).Yukihiro "Matz" Matsumoto
2021-06-07test/pack.c: reorganize test suits.Yukihiro "Matz" Matsumoto
2021-06-07pack.c: raise exception for unsupported specifiers.Yukihiro "Matz" Matsumoto
2021-06-06pack.c: check overflow before calling `pack_x`.Yukihiro "Matz" Matsumoto
2021-06-06pack.c: check overflow before reading count.Yukihiro "Matz" Matsumoto
2021-06-06pack.c: failed to detect overflow when `ch` is zero in `read_tmpl`.Yukihiro "Matz" Matsumoto
2021-06-05pack.c: hold `enum` values in `enum` variables not `int`.Yukihiro "Matz" Matsumoto
2021-06-03add a few regressions test from #2313Yukihiro "Matz" Matsumoto
The code was contributed from Carson McDonald (@carsonmcdonald)
2021-05-30sprintf.c: avoid object allocation in integer formatting.Yukihiro "Matz" Matsumoto
2021-05-30numeric.c: introduce `mrb_int_to_cstr()` to dump `mrb_int`.Yukihiro "Matz" Matsumoto
* refactor `mrb_integer_to_str()` * refactor `mrb_str_format()`
2021-05-29codegen.c: just raise the exception on broken node for assignments.Yukihiro "Matz" Matsumoto
2021-05-28kernel.c: avoid recursive VM call in `mrb_f_caller`.Yukihiro "Matz" Matsumoto
2021-05-28kernel.c: `caller` should not include the frame for itself.Yukihiro "Matz" Matsumoto
2021-05-27array.c: unify `mrb_ary_ref` and `mrb_ary_entry`Yukihiro "Matz" Matsumoto
Use only `mrb_ary_entry` hereafter.
2021-05-22mruby-sprintf: reduce float digits to avoid test failure.Yukihiro "Matz" Matsumoto
Too many digits to fit in single precision float numbers, so that tests fail when `MRB_USE_FLOAT32` defined.
2021-05-22fp_fmt.c: remove `mrb_float_to_cstr()`.Yukihiro "Matz" Matsumoto
The function was intended to be a utility function for `mruby-sprintf`. The functionality was integrated into `sprintf.c`.
2021-05-21sprintf.c: remove specifiers `%a` and `%A`.Yukihiro "Matz" Matsumoto
`fmt_fp.c` does not support those specifiers. In addition, I believe no one uses hexadecimal representation of float values.
2021-05-18parse.y: allow "command" syntax in endless method definition.Yukihiro "Matz" Matsumoto
This change allows `def hello = puts "Hello"` without parentheses. This syntax has been introduced since Ruby3.1.
2021-05-18parse.y: endless singleton method definition can omit parens.Yukihiro "Matz" Matsumoto
2021-05-17Global renaming regarding `integer` and `float`.Yukihiro "Matz" Matsumoto
Consistent number conversion function names: * `mrb_value` to immediate (C) value * `mrb_int()` -> `mrb_as_int()` * `mrb_to_flo()` -> `mrb_as_float()` * `mrb_value` to `mrb_value` (converted) * `mrb_to_int()' * `mrb_Integer()` - removed * `mrb_Float()` -> `mrb_to_float` Consistent function name (avoid `_flo` suffix): * `mrb_div_flo()` -> `mrb_div_float`
2021-05-17Rename `mrb_fixnum_to_str` to `mrb_integer_to_str`.Yukihiro "Matz" Matsumoto
2021-05-17Rename `mrb_flo_to_fixnum` to `mrb_float_to_integer`.Yukihiro "Matz" Matsumoto
2021-05-17rational.c: update function prefixes.Yukihiro "Matz" Matsumoto
To be consistent, functions with `rational_` prefix implements methods, functions with `rat_` prefix are utility functions.
2021-05-15mruby-array-ext/array.c: implement `Array#rotate` in C.Yukihiro "Matz" Matsumoto
The Ruby version of `Array#rotate!` generated a rotated array and replaced the receiver, but the C version rotates the receiver array in-place. So the performance is improved a lot both in speed and memory consumption. Look for the comments in `array.c` for the in-place rotating algorithm, if you are interested.
2021-05-14mruby-array-ext/array.c: implement `Array#compact` in C.Yukihiro "Matz" Matsumoto
2021-05-14array.rb: replace `can't` with `cannot`.Yukihiro "Matz" Matsumoto
To avoid editor coloring failures.
2021-05-13string.c: remove unnecessary branch in the internal method.Yukihiro "Matz" Matsumoto