summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2019-12-13Align RIStruct data for rationaltake-cheeze
2019-12-12Add `mrb_num_args_error()` for "wrong number of arguments" errorKOBAYASHI Shuji
To unify the style of messages.
2019-12-12Merge pull request #4861 from ↵Yukihiro "Matz" Matsumoto
shuujii/fix-behavior-of-Kernel-Integer-to-numbers-ending-with-_-and-spaces Fix behavior of `Kernel#Integer` to numbers ending with `_` and spaces
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-10Merge pull request #4860 from ↵Yukihiro "Matz" Matsumoto
shuujii/fix-behavior-of-String-to_i-Kernel-Integer-to-numbers-starting-with-_ Fix behavior of `String#to_i`/`Kernel#Integer` to numbers starting with `_`
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
2019-12-09Fix `mrb_get_argv()` to return array pointer every time; fix #4832Yukihiro "Matz" Matsumoto
2019-12-09Warnings for numbered parameters in nested blocks.Yukihiro "Matz" Matsumoto
2019-12-09Parser refactoring on numbered parameters.Yukihiro "Matz" Matsumoto
Now identifiers like `_1abc` are allowed.
2019-12-09Support new numbered parameter syntax `_1` instead of `@1`.Yukihiro "Matz" Matsumoto
2019-12-09Implement numbered parametersUkrainskiy Sergey
2019-12-09Merge pull request #4855 from dearblue/kwargs-uninitYukihiro "Matz" Matsumoto
Fix keyword arguments not be obtained with `mrb_get_args()`; Fix #4754
2019-12-08Merge pull request #4856 from shuujii/fix-the-error-message-of-Kernel-FloatYukihiro "Matz" Matsumoto
Fix the error message of `Kernel#Float`
2019-12-08Fix the error message of `Kernel#Float`KOBAYASHI Shuji
#### Before this patch: ``` $ bin/mruby -e 'Float("1_a")' -e:1: invalid string for float(a) (ArgumentError) ``` #### After this patch: ``` $ bin/mruby -e 'Float("1_a")' -e:1: invalid string for float("1_a") (ArgumentError) ```
2019-12-08Merge pull request #4854 from shuujii/add-tests-to-MathYukihiro "Matz" Matsumoto
Add tests to `Math`
2019-12-07Fix keyword arguments not be obtained with `mrb_get_args()`; Fix #4754dearblue
If ":" is after "|" and there is no "?" or "*", the keyword argument could not be obtained and it was not initialized with `undef`. For example: "|oo:"
2019-12-07Add tests to `Math`KOBAYASHI Shuji
2019-12-06Merge pull request #4852 from shuujii/auto-detect-MRB_TIME_T_UINTYukihiro "Matz" Matsumoto
Auto detect `MRB_TIME_T_UINT`
2019-12-05Auto detect `MRB_TIME_T_UINT`KOBAYASHI Shuji
2019-12-05Merge pull request #4851 from shuujii/refine-mrb_allocaYukihiro "Matz" Matsumoto
Refine `mrb_alloca()`
2019-12-04Refine `mrb_alloca()`KOBAYASHI Shuji
* The allocated memory is guaranteed to be aligned for any data type (it was not guaranteed when string type is embed). * Make allocation size exactly specified size (does not allocate space for a null byte).
2019-12-04Merge pull request #4850 from ↵Yukihiro "Matz" Matsumoto
shuujii/silence-Clang-warning-with-MRB_INT64-and-MRB_32BIT-in-time.c Silence Clang warning with `MRB_INT64` and `MRB_32BIT` in `time.c`
2019-12-03Silence Clang warning with `MRB_INT64` and `MRB_32BIT` in `time.c`KOBAYASHI Shuji
Silence the following warnings: ``` /mruby/mrbgems/mruby-time/src/time.c:871:15: warning: result of comparison of constant 9223372036854775807 with expression of type 'time_t' (aka 'long') is always false [-Wtautological-constant-out-of-range-compare] if (tm->sec > MRB_INT_MAX || tm->sec < MRB_INT_MIN) { ~~~~~~~ ^ ~~~~~~~~~~~ /mruby/mrbgems/mruby-time/src/time.c:871:40: warning: result of comparison of constant -9223372036854775808 with expression of type 'time_t' (aka 'long') is always false [-Wtautological-constant-out-of-range-compare] if (tm->sec > MRB_INT_MAX || tm->sec < MRB_INT_MIN) { ~~~~~~~ ^ ~~~~~~~~~~~ /mruby/mrbgems/mruby-time/src/time.c:887:16: warning: result of comparison of constant 9223372036854775807 with expression of type 'time_t' (aka 'long') is always false [-Wtautological-constant-out-of-range-compare] if (tm->usec > MRB_INT_MAX || tm->usec < MRB_INT_MIN) { ~~~~~~~~ ^ ~~~~~~~~~~~ /mruby/mrbgems/mruby-time/src/time.c:887:42: warning: result of comparison of constant -9223372036854775808 with expression of type 'time_t' (aka 'long') is always false [-Wtautological-constant-out-of-range-compare] if (tm->usec > MRB_INT_MAX || tm->usec < MRB_INT_MIN) { ~~~~~~~~ ^ ~~~~~~~~~~~ ```
2019-12-03Merge pull request #4849 from ↵Yukihiro "Matz" Matsumoto
shuujii/silence-Clang-warning-with-MRB_INT32-and-MRB_64BIT-in-time.c Silence Clang warning with `MRB_INT32` and `MRB_64BIT` in `time.c`
2019-12-02Silence Clang warning with `MRB_INT32` and `MRB_64BIT` in `time.c`KOBAYASHI Shuji
Silence the following warning: ``` /mruby/mrbgems/mruby-time/src/time.c:258:60: warning: result of comparison of constant -9223372036854775808 with expression of type 'mrb_int' (aka 'int') is always false [-Wtautological-constant-out-of-range-compare] if ((mrb_time_int)i > MRB_TIME_MAX || MRB_TIME_MIN > i) { ~~~~~~~~~~~~ ^ ~ ```
2019-12-02Merge pull request #4848 from ↵Yukihiro "Matz" Matsumoto
shuujii/fix-MRB_FIXNUM_SHIFT-with-MRB_WORD_BOXING-MRB_INT32-and-MRB_64BIT Fix `MRB_FIXNUM_SHIFT` with `MRB_WORD_BOXING`, `MRB_INT32` and `MRB_64BIT`
2019-12-01Fix `MRB_FIXNUM_SHIFT` with `MRB_WORD_BOXING`, `MRB_INT32` and `MRB_64BIT`KOBAYASHI Shuji
### Example ```ruby # example.rb max32 = 2**30 - 1 + 2**30 min32 = -max32-1 [max32, max32+1, min32, min32-1].each{|n| p [n, n.class]} ``` #### Before this patch: ``` $ bin/mruby example.rb [2147483647, Float] [2147483648, Float] [-2147483648, Float] [-2147483649, Float] ``` #### After this patch: ``` $ bin/mruby example.rb [2147483647, Fixnum] [2147483648, Float] [-2147483648, Fixnum] [-2147483649, Float] ```
2019-11-30Use a string as a common regexp representation; ref #4847Yukihiro "Matz" Matsumoto
2019-11-30Merge pull request #4847 from ↵Yukihiro "Matz" Matsumoto
shuujii/quit-mruby-v-immediately-if-no-program-is-given Quit `mruby -v` immediately if no program is given for Ruby compatibility
2019-11-30Quit `mruby -v` immediately if no program is given for Ruby compatibilityKOBAYASHI Shuji
2019-11-29Merge pull request #4846 from shuujii/fix-mruby---verbose-regression-by--4827Yukihiro "Matz" Matsumoto
Fix `mruby --verbose` (regression by #4827)
2019-11-29Fix `mruby --verbose` (regression by #4827)KOBAYASHI Shuji
#### Before this patch: ``` $ bin/mruby --verbose -e 'p 1' bin/mruby: Cannot open program file: --verbose ``` #### After this patch: ``` $ bin/mruby --verbose -e 'p 1' 00001 NODE_SCOPE: (snip) irep 0x7fe97041df30 nregs=4 nlocals=1 pools=0 syms=1 reps=0 iseq=11 file: -e 1 000 OP_LOADSELF R1 (snip) 1 ```
2019-11-29Merge pull request #4845 from shuujii/change-URL-of-mruby.orgYukihiro "Matz" Matsumoto
Change the URL of `mruby.org` [ci skip]
2019-11-28Change the URL of `mruby.org` [ci skip]KOBAYASHI Shuji
- `http` -> `https` - Remove `www.`
2019-11-27Merge pull request #4843 from shuujii/support-end-of-options-to-mruby-commandYukihiro "Matz" Matsumoto
Support `--` (end of options) to `mruby` command
2019-11-27Support `--` (end of options) to `mruby` commandKOBAYASHI Shuji
#### Before this patch: ``` $ bin/mruby -e 'p ARGV' -- -x bin/mruby: invalid option -- (-h will show valid options) ``` #### After this patch: ``` $ bin/mruby -e 'p ARGV' -- -x ["-x"] ```
2019-11-27Merge pull request #4837 from shuujii/add-assertion-to-RVALUE-sizeYukihiro "Matz" Matsumoto
Add assertion to `RVALUE` size
2019-11-26Merge pull request #4838 from ↵Yukihiro "Matz" Matsumoto
shuujii/rename-BITSIZE-to-BIT-and-BIT-to-BIT_POS-for-consistency Rename `BITSIZE` to `BIT` and `BIT` to `BIT_POS` for consistency
2019-11-25Merge pull request #4841 from ↵Yukihiro "Matz" Matsumoto
shuujii/fix-ARGV-value-in-mruby-command-regression-by-4827 Fix `ARGV` value in `mruby` command (regression by #4827)
2019-11-25Fix `ARGV` value in `mruby` command (regression by #4827)KOBAYASHI Shuji
#### Before this patch: ``` $ bin/mruby -e 'p ARGV' a b ["bin/mruby", "-e", "p ARGV", "a", "b"] ``` #### After this patch: ``` $ bin/mruby -e 'p ARGV' a b ["a", "b"] ```
2019-11-25Merge pull request #4827 from ↵Yukihiro "Matz" Matsumoto
shuujii/support-short-options-concatenation-to-mruby-command Support short options concatenation to `mruby` command
2019-11-24Merge pull request #4840 from shuujii/remove-unused-methods-of-MRubyIOTestUtilYukihiro "Matz" Matsumoto
Remove unused methods of `MRubyIOTestUtil`
2019-11-24Remove unused methods of `MRubyIOTestUtil`KOBAYASHI Shuji
2019-11-24Merge pull request #4834 from ↵Yukihiro "Matz" Matsumoto
shuujii/use-proper-PEEK-macro-for-OP_EPUSH-in-patch_irep Use proper `PEEK` macro for `OP_EPUSH` in `patch_irep`; fix #4833
2019-11-23Rename `BITSIZE` to `BIT` and `BIT` to `BIT_POS` for consistencyKOBAYASHI Shuji
The bit width terminology is unified to `BIT` according to `MRB_INT_BIT` and `CHAR_BIT`. Also the bit position terminology is unified to `BIT_POS`.
2019-11-23Add assertion to `RVALUE` sizeKOBAYASHI Shuji
2019-11-23Merge pull request #4836 from shuujii/allow-true-false-argument-to-Kernel-exitYukihiro "Matz" Matsumoto
Allow `true`/`false` argument to `Kernel#exit`