summaryrefslogtreecommitdiffhomepage
path: root/mrbgems
AgeCommit message (Collapse)Author
2020-01-10Small refactoring in `hash_slice`; ref #4926Yukihiro "Matz" Matsumoto
2020-01-08`p->locals` may be `NULL` when error occurs before the point.Yukihiro "Matz" Matsumoto
This is reported by oss-fuzz: Issue 19886: mruby:mruby_fuzzer: Potential-null-reference in setup_numparams
2020-01-06Avoid Boxing/Unboxing of file descriptors; ref #4872Yukihiro "Matz" Matsumoto
2020-01-06Merge branch 'file-size-truncate' of https://github.com/dearblue/mruby into ↵Yukihiro "Matz" Matsumoto
dearblue-file-size-truncate
2020-01-06Fix `mrb_str_len_to_dbl` to support Hexadecimal like `0x10`.Yukihiro "Matz" Matsumoto
2020-01-06Avoid creating temporary objects in `read_irep_record_1`; close #4920Yukihiro "Matz" Matsumoto
The basic idea of this change is from @dearblue. Note: the arguments of `mrb_str_pool()` have changed, but the function is provided for internal use (No `MRB_API`). So basically you don't have to worry about the change.
2020-01-05Fix ainfo with keyword arguments; fix #4921dearblue
2020-01-01Rename `mrb_num_args_error` to `mrb_argnum_error`; ref #4863Yukihiro "Matz" Matsumoto
2020-01-01Merge pull request #4863 from ↵Yukihiro "Matz" Matsumoto
shuujii/add-mrb_num_args_error-for-wrong-number-of-arguments-error Add `mrb_num_args_error()` for "wrong number of arguments" error
2020-01-01Fixed wrong usages of `mrb_get_args` in `vformat.c`.Yukihiro "Matz" Matsumoto
2020-01-01Allow `here-doc` in the middle of Hash expressions; fix #4815Yukihiro "Matz" Matsumoto
2019-12-31Silence GCC warning in `time.c` on Travis CIKOBAYASHI Shuji
Silence the following warnings: ``` /mruby/mrbgems/mruby-time/src/time.c:260:55: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if ((MRB_INT_MAX > MRB_TIME_MAX && i > 0 && i > MRB_TIME_MAX) || ^ ```
2019-12-31Fix builds for modern mingw; fix #4869dearblue
What I intended to fix in #4869 was a patch for an old MinGW. Recent MinGWs have their own `mkstemp()` function. I knew this after checking the patch #4903.
2019-12-29Avoid unneeded directory creation during `rake -T`, etc.KOBAYASHI Shuji
2019-12-27Merge pull request #4910 from ↵Yukihiro "Matz" Matsumoto
shuujii/use-Rake-DSL-instead-of-commands-of-FileUtils Use Rake DSL instead of commands of `FileUtils`
2019-12-27Use Rake DSL instead of commands of `FileUtils`KOBAYASHI Shuji
- Respect `--verbose(-v)` and `--dry-run(-n)` options. - Silence warnings to keyword arguments on Ruby 2.7.
2019-12-27Prohibit assignment to numbered parameters.Yukihiro "Matz" Matsumoto
It is stricter than CRuby but confusing anyway.
2019-12-27Allow non numbered-parameter identifier like `_1` outside of blocks.Yukihiro "Matz" Matsumoto
But it causes warnings as CRuby does; fix #4892 fix #489
2019-12-27Numbered parameters: usually linked list uses `cdr` for links.Yukihiro "Matz" Matsumoto
2019-12-27Prohibit numbered parameters as method arguments; fix #4892Yukihiro "Matz" Matsumoto
As of CRuby2.7 it is only warned. `mruby` prohibits explicitly to implement the future Ruby3 behavior.
2019-12-24Refine the assertion failure message in mrdb print testsKOBAYASHI Shuji
#### Before this patch: ```console Fail: mruby-bin-debugger(print) error (mrbgems: mruby-bin-debugger) - Assertion[2] Expected true to be false. ``` #### After this patch: ```console Fail: mruby-bin-debugger(print) error (mrbgems: mruby-bin-debugger) - Assertion[2] Expected "$2 = undefined method 'bar' (NoMethodError)\n" to be start_with? "$2 = (eval):2: undefined method". ```
2019-12-23Use binary mode in mrbc source code readingtake-cheeze
2019-12-23Handle CR LF newline natively in lexertake-cheeze
2019-12-21Numbered parameters should not be available in the lambda bodies.Yukihiro "Matz" Matsumoto
`mruby` does not warn like `CRuby` for cases like #4893. Fix #4890, fix #4891, fix #4893.
2019-12-21`_0` is not numbered parameterKOBAYASHI Shuji
#### Before this patch: ```console $ bin/mruby rb -e '_0=:l; p ->{_0}.()' -e:1:13: _0 is not available -e:1:13: syntax error, unexpected $end, expecting '}' ``` #### After this patch (same as Ruby): ```console $ bin/mruby rb -e '_0=:l; p ->{_0}.()' :l ```
2019-12-21Fix SEGV from numbered parameters outside of blocks; fix #4862Yukihiro "Matz" Matsumoto
2019-12-20Merge pull request #4871 from dearblue/method-in-methodYukihiro "Matz" Matsumoto
Avoid method in method
2019-12-20Merge pull request #4870 from dearblue/unnessesary-branchYukihiro "Matz" Matsumoto
Remove unnessesary branches
2019-12-20Merge pull request #4874 from dearblue/method-listYukihiro "Matz" Matsumoto
Fix for `#methods` to include methods that were `undef`
2019-12-19Fix mixed declarations in 429f6deYukihiro "Matz" Matsumoto
2019-12-19Merge pull request #4881 from shuujii/fix-mruby-bin-debugger-testsYukihiro "Matz" Matsumoto
Fix `mruby-bin-debugger` tests; ref d2f2f9db
2019-12-19Reimplement `vformat` tests; close #4868Yukihiro "Matz" Matsumoto
Avoid creating `Data` object that refers `mruby` objects. Also close #4622 ref #4613
2019-12-19Revert "`%C` value need not to be saved in `TestVFormat::Native`; close #4868"Yukihiro "Matz" Matsumoto
This reverts commit f507ff4842b92a60c0c600fa1f29efdf2688c877. It makes AppVeyor tests fail.
2019-12-18Fix `mruby-bin-debugger` tests; ref d2f2f9dbKOBAYASHI Shuji
2019-12-18`%C` value need not to be saved in `TestVFormat::Native`; close #4868Yukihiro "Matz" Matsumoto
2019-12-17Merge pull request #4869 from dearblue/mingw32-io-testYukihiro "Matz" Matsumoto
Fix mruby-io test for mingw32
2019-12-16Merge pull request #4877 from ↵Yukihiro "Matz" Matsumoto
shuujii/drop-dependencies-from-mruby-complex-to-some-gems Drop dependencies from `mruby-complex` to some gems
2019-12-16Merge pull request #4859 from dearblue/authorsYukihiro "Matz" Matsumoto
Add "mruby developers" into some gems; Resolve #4709
2019-12-15Drop dependencies from `mruby-complex` to some gemsKOBAYASHI Shuji
2019-12-14Fix for `#methods` to include methods that were `undef`dearblue
If `#methods` traverse the super class, it includes the methods that were does `undef` in the subclass. Before patched: ```terminal % bin/mruby -e 'p Module.instance_methods - Class.instance_methods' [] ``` After patched: ```terminal % bin/mruby -e 'p Module.instance_methods - Class.instance_methods' [:append_features, :extend_object] ```
2019-12-14Implement `File#size` and `File#truncate`dearblue
2019-12-14Avoid method in methoddearblue
And rename `File.concat_path` to `File._concat_path`.
2019-12-14Remove unnessesary branchesdearblue
2019-12-14Fix mruby-io test for mingw32dearblue
Need `mkstemp()` implements.
2019-12-12Add `mrb_num_args_error()` for "wrong number of arguments" errorKOBAYASHI Shuji
To unify the style of messages.
2019-12-11Fix behavior of `Kernel#Integer` to numbers ending with `_` and spacesKOBAYASHI Shuji
#### Before this patch: ```ruby Integer("1_ ") #=> 1 ``` #### After this patch (same as Ruby): ```ruby Integer("1_ ") #=> ArgumentError ```
2019-12-10Fix behavior of `String#to_i`/`Kernel#Integer` to numbers starting with `_`KOBAYASHI Shuji
#### Before this patch: ```ruby Integer("_1") #=> 1 "_1".to_i #=> 1 ``` #### After this patch (same as Ruby): ```ruby Integer("_1") #=> ArgumentError "_1".to_i #=> 0 ```
2019-12-10Merge pull request #4858 from ↵Yukihiro "Matz" Matsumoto
shuujii/fix-that-String-to_f-accepts-consecutive-_-as-a-numeric-expression Fix that `String#to_f` accepts consecutive `_` as a numeric expression
2019-12-09Add "mruby developers" into some gems; Resolve #4709dearblue
It is writing side by side with the original authors.
2019-12-09Fix that `String#to_f` accepts consecutive `_` as a numeric expressionKOBAYASHI Shuji
Consecutive `_` is not allowed as a numeric expression: 1_2__3 #=> SyntaxError Float("1_2__3") #=> ArgumentError Integer("1_2__3") #=> ArgumentError "1_2__3".to_i #=> 12 But `String#to_f` accept it, so I fixed the issue. Before this patch: "1_2__3".to_f #=> 123 After this patch: "1_2__3".to_f #=> 12