KOBAYASHI Shuji
df437eebcc
Fix mruby --verbose (regression by #4827 )
...
#### 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-29 19:02:04 +09:00
Yukihiro "Matz" Matsumoto
75e96c6927
Merge pull request #4845 from shuujii/change-URL-of-mruby.org
...
Change the URL of `mruby.org` [ci skip]
2019-11-29 09:22:26 +09:00
KOBAYASHI Shuji
1680f2c95e
Change the URL of mruby.org [ci skip]
...
- `http` -> `https`
- Remove `www.`
2019-11-28 17:54:52 +09:00
Yukihiro "Matz" Matsumoto
17ec885270
Merge pull request #4843 from shuujii/support-end-of-options-to-mruby-command
...
Support `--` (end of options) to `mruby` command
2019-11-27 22:41:36 +09:00
KOBAYASHI Shuji
f4b528e07a
Support -- (end of options) to mruby command
...
#### 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-27 19:51:43 +09:00
Yukihiro "Matz" Matsumoto
190649e591
Merge pull request #4837 from shuujii/add-assertion-to-RVALUE-size
...
Add assertion to `RVALUE` size
2019-11-27 09:47:35 +09:00
Yukihiro "Matz" Matsumoto
ec957ec5ee
Merge pull request #4838 from 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-26 06:31:48 +09:00
Yukihiro "Matz" Matsumoto
ff15a586a0
Merge pull request #4841 from shuujii/fix-ARGV-value-in-mruby-command-regression-by-4827
...
Fix `ARGV` value in `mruby` command (regression by #4827 )
2019-11-25 23:19:17 +09:00
KOBAYASHI Shuji
f9bd414350
Fix ARGV value in mruby command (regression by #4827 )
...
#### 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-25 21:56:27 +09:00
Yukihiro "Matz" Matsumoto
a89d15cdde
Merge pull request #4827 from shuujii/support-short-options-concatenation-to-mruby-command
...
Support short options concatenation to `mruby` command
2019-11-25 09:49:28 +09:00
Yukihiro "Matz" Matsumoto
1d1c81258e
Merge pull request #4840 from shuujii/remove-unused-methods-of-MRubyIOTestUtil
...
Remove unused methods of `MRubyIOTestUtil`
2019-11-24 23:07:15 +09:00
KOBAYASHI Shuji
ce553fa834
Remove unused methods of MRubyIOTestUtil
2019-11-24 21:40:22 +09:00
Yukihiro "Matz" Matsumoto
b3e6a993a9
Merge pull request #4834 from 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-24 07:52:17 +09:00
KOBAYASHI Shuji
375c1ebc41
Rename BITSIZE to BIT and BIT to BIT_POS for consistency
...
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-23 20:40:23 +09:00
KOBAYASHI Shuji
6cf99d12ac
Add assertion to RVALUE size
2019-11-23 17:36:46 +09:00
Yukihiro "Matz" Matsumoto
56f9106d94
Merge pull request #4836 from shuujii/allow-true-false-argument-to-Kernel-exit
...
Allow `true`/`false` argument to `Kernel#exit`
2019-11-23 06:25:02 +09:00
Yukihiro "Matz" Matsumoto
8bcf44669c
Merge pull request #4835 from shuujii/introduce-mrb_ssize-type-for-buffer-size-on-memory
...
Introduce `mrb_ssize` type for buffer size on memory; ref #4483
2019-11-22 19:40:19 +09:00
KOBAYASHI Shuji
d81e4d71c1
Allow true/false argument to Kernel#exit
2019-11-22 18:29:38 +09:00
KOBAYASHI Shuji
a2df247063
Introduce mrb_ssize type for buffer size on memory; ref #4483
...
Previously, `mrb_int` was used as the type that represents the buffer size
on memory, but the sizes of `RString` and `RArray` exceed 6 words when
`MRB_INT64` is enabled on 32-bit CPU.
I don't think it is necessary to be able to represent the buffer size on
memory that exceeds the virtual address space. Therefore, for this purpose,
introduce `mrb_ssize` which doesn't exceed the sizes of `mrb_int` and
pointer.
I think all `mrb_int` used for this purpose should be changed to
`mrb_ssize`, but currently only the members of the structures (`RString`,
`mrb_shared_string`, `RArray` and `mrb_shared_array`) are changed.
2019-11-21 19:34:02 +09:00
KOBAYASHI Shuji
8596edba09
Use proper PEEK macro for OP_EPUSH in patch_irep; fix #4833
2019-11-20 16:00:58 +09:00
Yukihiro "Matz" Matsumoto
1bb1df19d8
Merge pull request #4831 from shuujii/always-enable-the-rational-and-complex-literals
...
Always enable the rational and complex literals
2019-11-19 23:32:16 +09:00
Yukihiro "Matz" Matsumoto
125c660974
Merge pull request #4830 from mruby/stable
...
Release `mruby 2.1.0`.
2019-11-19 23:30:37 +09:00
KOBAYASHI Shuji
351c9c80e7
Always enable the rational and complex literals
...
I think they can always be enabled because the regular expression literal is
always enabled.
2019-11-19 21:10:59 +09:00
Hiroshi Mimaki
57a56ddaa2
Release mruby 2.1.0.
2.1.0
2019-11-19 18:58:11 +09:00
Yukihiro "Matz" Matsumoto
79e73dd86a
Merge pull request #4828 from shuujii/refactor-mrb_string_value_cstr
...
Refactor `mrb_string_value_cstr`
2019-11-19 02:52:39 +09:00
KOBAYASHI Shuji
3241a7e5a8
Refactor mrb_string_value_cstr
...
- Keep `MRB_STR_ASCII` flag.
- Avoid a string object creation.
2019-11-19 01:07:58 +09:00
Yukihiro "Matz" Matsumoto
bd87799673
Merge pull request #4825 from shuujii/fix-argument-specs-to-Kernel
...
Fix argument specs to `Kernel`
2019-11-18 08:15:58 +09:00
KOBAYASHI Shuji
9de7130a9a
Support short options concatenation to mruby command
...
#### Before this patch:
```
$ bin/mruby -ce 1
bin/mruby: Cannot open program file: 1
```
#### After this patch:
```
$ bin/mruby -ce 1
Syntax OK
```
2019-11-17 16:38:50 +09:00
Yukihiro "Matz" Matsumoto
74310f41d7
Merge pull request #4826 from shuujii/revert-Implement-Ruby2.7-frozen-strings-from-Symbol-to_s
...
Revert "Implement Ruby2.7's frozen strings from `Symbol#to_s`"
2019-11-17 04:38:46 +09:00
KOBAYASHI Shuji
a367373fe3
Revert "Implement Ruby2.7's frozen strings from Symbol#to_s"
...
This feature was reverted from Ruby 2.7.
2019-11-16 19:47:31 +09:00
KOBAYASHI Shuji
04baaab311
Fix argument specs to Kernel
2019-11-15 19:07:42 +09:00
Yukihiro "Matz" Matsumoto
c9f156ef0c
Merge pull request #4823 from shuujii/fix-here-document-with-EOF
...
Fix here document with EOF
2019-11-15 08:16:33 +09:00
KOBAYASHI Shuji
455930fbc4
Fix here document with EOF
...
#### Before this patch:
```
$ bin/mruby -e 'p <<EOS
1
EOS'
-e:4:0: can't find heredoc delimiter "EOS" anywhere before EOF
-e:4:0: syntax error, unexpected $end, expecting tHEREDOC_END or tHD_STRING_PART or tHD_STRING_MID
```
#### After this patch (same as Ruby):
```
$ bin/mruby -e 'p <<EOS
1
EOS'
"1\n"
```
2019-11-14 20:28:36 +09:00
Yukihiro "Matz" Matsumoto
db43738397
Merge pull request #4821 from shuujii/use-mrb_intern_lit-if-possible-in-parse.y
...
Use `mrb_intern_lit` if possible in `parse.y`
2019-11-13 21:08:47 +09:00
Yukihiro "Matz" Matsumoto
079aff1779
Revert a76dc04 to resolve #4820
2019-11-13 21:06:26 +09:00
KOBAYASHI Shuji
29133b2fe2
Use mrb_intern_lit if possible in parse.y
2019-11-13 19:20:47 +09:00
Yukihiro "Matz" Matsumoto
37c8cbe76b
Merge pull request #4819 from shuujii/use-intern-instead-of-intern_cstr-if-possible-in-parse.y
...
Use `intern` instead of `intern_cstr` if possible in `parse.y`
2019-11-13 08:10:50 +09:00
KOBAYASHI Shuji
ac917983c5
Use intern instead of intern_cstr if possible in parse.y
2019-11-12 21:04:12 +09:00
Yukihiro "Matz" Matsumoto
1259564c01
Merge pull request #4818 from shuujii/fix-argument-specs-to-Integer
...
Fix argument specs to `Integer`
2019-11-12 08:33:21 +09:00
KOBAYASHI Shuji
edbc6d8ab5
Fix argument specs to Integer
2019-11-11 20:48:52 +09:00
Yukihiro "Matz" Matsumoto
c268e36e44
Require Regexp.escape before interpolating build_dir; fix #4817
2019-11-11 18:13:24 +09:00
Yukihiro "Matz" Matsumoto
067c11f65d
Merge pull request #4816 from shuujii/defer-getting-caller_dir-until-needed-in-MRubyLoadGems-gem
...
Defer getting `caller_dir` until needed in `MRuby::LoadGems#gem`
2019-11-11 07:33:31 +09:00
KOBAYASHI Shuji
b5946822af
Defer getting caller_dir until needed in MRuby::LoadGems#gem
2019-11-10 19:40:07 +09:00
Yukihiro "Matz" Matsumoto
cc54257de5
Merge pull request #4814 from shuujii/fix-argument-specs-to-IO
...
Fix argument specs to `IO`
2019-11-10 08:29:55 +09:00
KOBAYASHI Shuji
a72917541f
Fix argument specs to IO
2019-11-09 22:08:00 +09:00
Yukihiro "Matz" Matsumoto
e50344b5da
Avoid unnecessary Symbol#to_s call; fix #4812
2019-11-08 23:38:40 +09:00
Yukihiro "Matz" Matsumoto
1a0c799898
Merge pull request #4813 from shuujii/remove-unneeded-dependency-from-mruby-hash-ext
...
Remove unneeded dependency from `mruby-hash-ext`
2019-11-08 23:37:40 +09:00
KOBAYASHI Shuji
ac213907d7
Remove unneeded dependency from mruby-hash-ext
2019-11-08 20:40:20 +09:00
Yukihiro "Matz" Matsumoto
7750c61e29
Fixed a bug in keyword arguments in block parameters; fix #4810
...
This is caused by incomplete fix in #4746
2019-11-08 14:06:46 +09:00
Yukihiro "Matz" Matsumoto
8ff001ef30
Avoid crashing of Array#unshift; fix #4808
...
On cases like `a.unshift(*a)`.
2019-11-08 10:57:18 +09:00