summaryrefslogtreecommitdiffhomepage
path: root/mrbgems
AgeCommit message (Collapse)Author
2019-10-10Integrate `mrb_str_inspect` and `mrb_str_dump`KOBAYASHI Shuji
2019-10-09Fix that `print` command raises `FrozenError` in `mrdb`; ref 1f5a7f2fKOBAYASHI Shuji
#### Before this patch: ``` $ echo 'p true' | bin/mrdb /dev/null (/dev/null:1) mruby application exited. FrozenError: can't modify frozen String (-:0) ``` #### After this patch: ``` $ echo 'p true' | bin/mrdb /dev/null (/dev/null:1) $1 = true (/dev/null:1) ```
2019-10-09Revert part of #4758 to reduce number of tests.Yukihiro "Matz" Matsumoto
More tests, more time.
2019-10-08Merge pull request #4758 from ↵Yukihiro "Matz" Matsumoto
shuujii/implement-Ruby2.7-frozen-strings-from-Module-name Implement Ruby2.7's frozen strings from `Module#name`
2019-10-08Use `mrb_str_concat` instead of `mrb_str_to_str` + `mrb_str_cat_str`KOBAYASHI Shuji
2019-10-08Implement Ruby2.7's frozen strings from `Module#name`KOBAYASHI Shuji
2019-10-06Merge pull request #4757 from shuujii/refine-the-usage-message-of-mirb-commandYukihiro "Matz" Matsumoto
Refine the usage message of `mirb` command
2019-10-06Refine the usage message of `mirb` commandKOBAYASHI Shuji
2019-10-06Refine the usage message of `mruby` commandKOBAYASHI Shuji
2019-10-05Drop initialization dependency from `mruby-print` to `mruby-sprintf`KOBAYASHI Shuji
In the old implementation, `Kernel#printf` raise error if `mruby-sprintf` gem isn't specified before `mruby-print` gem. The new implementation eliminates this ordering issue. This way is the same as `Kernel#printf` and `IO#printf` in `mruby-io` gem.
2019-10-04Implement Ruby2.7's frozen strings from `Symbol#to_s`.Yukihiro "Matz" Matsumoto
2019-10-04Refactor local variables addition in optional/keyword arguments.Yukihiro "Matz" Matsumoto
2019-10-03Add local variable reordering to `kwargs`; ref #4746Yukihiro "Matz" Matsumoto
2019-10-03Need to reorder local variables defined in `opt`; fix #4746Yukihiro "Matz" Matsumoto
For example, local variables in the following def: ```ruby def foo(a = (not_set = true), &block) ... end ``` should be `a, block, not_set`, but were `a, not_set, block`.
2019-10-03Refactor `append_gen` function.Yukihiro "Matz" Matsumoto
2019-10-02Merge pull request #4736 from dearblue/ast-strdumpYukihiro "Matz" Matsumoto
Escape the AST string
2019-10-01Support `NODE_LITERAL_DELIM` in `mrb_parser_dump`KOBAYASHI Shuji
#### Before this patch: ```terminal $ bin/mruby -v -e '%w[1 2]' mruby 2.0.1 (2019-04-04) 00001 NODE_SCOPE: 00001 NODE_BEGIN: 00001 NODE_WORDS: 00001 NODE_STR "1" len 1 00001 node type: 85 (0x55) 00001 NODE_STR "2" len 1 (snip) ``` #### After this patch: ```terminal $ bin/mruby -v -e '%w[1 2]' mruby 2.0.1 (2019-04-04) 00001 NODE_SCOPE: 00001 NODE_BEGIN: 00001 NODE_WORDS: 00001 NODE_STR "1" len 1 00001 NODE_LITERAL_DELIM 00001 NODE_STR "2" len 1 (snip) ```
2019-10-01Support `NODE_SYMBOLS` in `mrb_parser_dump`KOBAYASHI Shuji
#### Before this patch: ```terminal $ bin/mruby -v -e '%i[1]; %I[#{2}]' mruby 2.0.1 (2019-04-04) 00001 NODE_SCOPE: 00001 NODE_BEGIN: 00001 node type: 87 (0x57) 00001 node type: 87 (0x57) (snip) ``` #### After this patch: ```terminal $ bin/mruby -v -e '%i[1]; %I[#{2}]' mruby 2.0.1 (2019-04-04) 00001 NODE_SCOPE: 00001 NODE_BEGIN: 00001 NODE_SYMBOLS: 00001 NODE_STR "1" len 1 00001 NODE_SYMBOLS: 00001 NODE_STR "" len 0 00001 NODE_BEGIN: 00001 NODE_INT 2 base 10 00001 NODE_STR "" len 0 (snip) ```
2019-10-01Support `NODE_WORDS` in `mrb_parser_dump`KOBAYASHI Shuji
#### Before this patch: ```terminal $ bin/mruby -v -e '%w[1]; %W[#{2}]' mruby 2.0.1 (2019-04-04) 00001 NODE_SCOPE: 00001 NODE_BEGIN: 00001 node type: 86 (0x56) 00001 node type: 86 (0x56) (snip) ``` #### After this patch: ```terminal $ bin/mruby -v -e '%w[1]; %W[#{2}]' mruby 2.0.1 (2019-04-04) 00001 NODE_SCOPE: 00001 NODE_BEGIN: 00001 NODE_WORDS: 00001 NODE_STR "1" len 1 00001 NODE_WORDS: 00001 NODE_STR "" len 0 00001 NODE_BEGIN: 00001 NODE_INT 2 base 10 00001 NODE_STR "" len 0 (snip) ```
2019-09-30Support `NODE_DSYM` in `mrb_parser_dump`KOBAYASHI Shuji
#### Before this patch: ```terminal $ bin/mruby -v -e ':"#{1}"; ["#{2}": 0]' mruby 2.0.1 (2019-04-04) 00001 NODE_SCOPE: 00001 NODE_BEGIN: 00001 node type: 83 (0x53) 00001 NODE_ARRAY: 00001 NODE_KW_HASH: 00001 key: 00001 node type: 83 (0x53) 00001 value: 00001 NODE_INT 0 base 10 (snip) ``` #### After this patch: ```terminal $ bin/mruby -v -e ':"#{1}"; ["#{2}": 0]' mruby 2.0.1 (2019-04-04) 00001 NODE_SCOPE: 00001 NODE_BEGIN: 00001 NODE_DSYM: 00001 NODE_DSTR: 00001 NODE_STR "" len 0 00001 NODE_BEGIN: 00001 NODE_INT 1 base 10 00001 NODE_STR "" len 0 00001 NODE_ARRAY: 00001 NODE_KW_HASH: 00001 key: 00001 NODE_DSYM: 00001 NODE_DSTR: 00001 NODE_STR "" len 0 00001 NODE_BEGIN: 00001 NODE_INT 2 base 10 00001 NODE_STR "" len 0 00001 value: 00001 NODE_INT 0 base 10 (snip) ```
2019-09-29Print missing `:` before newline in `mrb_parser_dump`KOBAYASHI Shuji
2019-09-29Merge pull request #4739 from dearblue/restore-arenaYukihiro "Matz" Matsumoto
Restore GC arena frequently
2019-09-29Further refactoring over #4738Yukihiro "Matz" Matsumoto
2019-09-29Restore GC arena frequentlydearblue
2019-09-29Remove unnecessary assignmentsdearblue
2019-09-29Escape the AST stringdearblue
2019-09-28Remove unused node type in `codegen()`KOBAYASHI Shuji
2019-09-28Replace `mrb_sym_name` with `mrb_sym_dump`; ref #4684Yukihiro "Matz" Matsumoto
2019-09-26Use type predicate macros instead of `mrb_type` if possibleKOBAYASHI Shuji
For efficiency with `MRB_WORD_BOXING` (implement type predicate macros for all `enum mrb_vtype`).
2019-09-26Use proper type specifier for `mrb_raisef()`; ref #4731Yukihiro "Matz" Matsumoto
The following two may be different: * `%d` for `int` * `%i` for `mrb_int`
2019-09-26Merge pull request #4732 from dearblue/inttypesYukihiro "Matz" Matsumoto
Use inttypes for `snprintf()`
2019-09-26Merge pull request #4731 from dearblue/consistent-typeYukihiro "Matz" Matsumoto
Keep the type of `posarg` consistent
2019-09-25Merge pull request #4729 from dearblue/fix-4598Yukihiro "Matz" Matsumoto
Fix `MRB_WITHOUT_FLOAT` reversal; fix #4598
2019-09-25Merge pull request #4730 from dearblue/fall-throughYukihiro "Matz" Matsumoto
Add "fall through"
2019-09-25Rename symbol-to-string functions; close #4684Yukihiro "Matz" Matsumoto
* mrb_sym2name -> mrb_sym_name * mrb_sym2name_len -> mrb_sym_name_len * mrb_sym2str -> mrb_sym_str
2019-09-25Use inttypes for `snprintf()`dearblue
2019-09-25Keep the type of `posarg` consistentdearblue
Match the type with the caller and related functions.
2019-09-25Add "fall through"dearblue
2019-09-25Fix `MRB_WITHOUT_FLOAT` reversal; fix #4598dearblue
2019-09-21Merge pull request #4724 from ↵Yukihiro "Matz" Matsumoto
shuujii/use-mrb_define_method-instead-of-mrb_define_alias Use `mrb_define_method` instead of `mrb_define_alias`
2019-09-21Use `mrb_define_method` instead of `mrb_define_alias`KOBAYASHI Shuji
2019-09-20Add optional argument to `Module#class_variables`.Yukihiro "Matz" Matsumoto
2019-09-20Fix typo in `Array#difference` document [ci skip]KOBAYASHI Shuji
2019-09-18Fix `Enumerable#filter_map` without block; ref d380c7d2KOBAYASHI Shuji
2019-09-18Remove `mrb_get_args(mrb, "")`; ref 30f37872KOBAYASHI Shuji
2019-09-16Entrust "no block given" error to `mrb_get_args()`dearblue
Some error messages will be changed.
2019-09-16Merge pull request #4255 from shuujii/enumerator-size-is-not-supportedYukihiro "Matz" Matsumoto
`Enumerator#size` is not supported [ci skip]
2019-09-16Implement `Enumerable` tally from Ruby2.7.Yukihiro "Matz" Matsumoto
2019-09-16Implement `filter_map` from Ruby2.6.Yukihiro "Matz" Matsumoto
2019-09-16Add `filter` aliases for `Enumerable` and `Hash`.Yukihiro "Matz" Matsumoto