KOBAYASHI Shuji
7fcda585bc
Refactor mrb_type in include/mruby/boxing_word.h
2019-09-15 18:11:16 +09:00
Yukihiro "Matz" Matsumoto
76355dee68
Add unavailability of declaration form of visibility methods; #4708
2019-09-14 23:21:44 +09:00
Yukihiro "Matz" Matsumoto
28bbd3e7d9
Add argument names to C function prototypes.
2019-09-14 23:21:44 +09:00
Yukihiro "Matz" Matsumoto
57d7fe94a9
Add a macro mrb_frozen_p that points to MRB_FROZEN_P.
2019-09-14 23:21:44 +09:00
Yukihiro "Matz" Matsumoto
6f1c08f7d8
Replace String#byteslice by custom IO._bufread.
...
`byteslice` creates 2 string objects. `_bufread` creates one, and
modifies the original buffer string, that is more efficient.
2019-09-14 23:21:44 +09:00
Yukihiro "Matz" Matsumoto
dcc2d44d93
Merge pull request #4707 from shuujii/use-%C-to-mrb_name_error-in-mrb_method_search
...
Use `%C` to `mrb_name_error` in `mrb_method_search`; ref 5890c7d5
2019-09-14 14:35:36 +09:00
KOBAYASHI Shuji
2f74a97d04
Use %C to mrb_name_error in mrb_method_search; ref 5890c7d5
2019-09-14 11:28:02 +09:00
Yukihiro "Matz" Matsumoto
6620b1cdcb
Revert "Update %pure-parser to %define api.pure for newer bison; fix #4706 "
...
The `bison` on MacOS does not support `%define api.pure`.
This reverts commit f7c9f1f796 .
2019-09-14 10:28:07 +09:00
Yukihiro "Matz" Matsumoto
f7c9f1f796
Update %pure-parser to %define api.pure for newer bison; fix #4706
2019-09-14 09:05:32 +09:00
Yukihiro "Matz" Matsumoto
76f1aa7de5
Remove mrb_funcall from <=> operations.
2019-09-14 09:05:32 +09:00
Yukihiro "Matz" Matsumoto
fcd3f8450d
Raise an error from String#<=> with a non string operand.
2019-09-14 09:05:32 +09:00
Yukihiro "Matz" Matsumoto
34cdff5ee4
Use mrb_equal instead of mrb_funcall.
...
In the typical case, `mrb_funcall` invocation would be skipped.
2019-09-14 09:05:32 +09:00
Yukihiro "Matz" Matsumoto
5890c7d516
Remove mrb_funcall from mrb_method_search.
2019-09-14 09:05:32 +09:00
Yukihiro "Matz" Matsumoto
2fa4a55e80
Replace loop method with while true loop to gain performance.
2019-09-14 09:05:32 +09:00
Yukihiro "Matz" Matsumoto
5489fae8f2
Merge pull request #4705 from shuujii/revert-part-of-Refine-tasks-toolchains-gcc-clang.rake
...
Revert part of "Refine `tasks/toolchains/(gcc|clang).rake`" (07c6b7f0 )
2019-09-13 22:55:50 +09:00
KOBAYASHI Shuji
895ab2342e
Revert part of "Refine tasks/toolchains/(gcc|clang).rake" ( 07c6b7f0)
...
`-Wzero-length-array` is not a mandatory option, so the original is better.
2019-09-13 21:28:23 +09:00
Yukihiro "Matz" Matsumoto
1e82b1958b
Merge pull request #4704 from shuujii/fix-warnings-for-invalid-C++-option-with-enable_cxx_abi
...
Fix warnings for invalid C++ option with `enable_cxx_abi`; ref #3618 , #4703
2019-09-13 19:59:40 +09:00
KOBAYASHI Shuji
be76cec342
Fix warnings for invalid C++ option with enable_cxx_abi; ref #3618 , #4703
2019-09-13 17:14:37 +09:00
Yukihiro "Matz" Matsumoto
ad4bdda074
Update assert_take for zero size take.
2019-09-13 02:28:56 +09:00
Yukihiro "Matz" Matsumoto
f5542b9927
Add Enumerator.produce from Ruby2.7
2019-09-13 02:28:56 +09:00
Yukihiro "Matz" Matsumoto
d4af765651
Remove -std=gnu99 when enable_cxx_abi; ref #4703
...
To stop warnings since C++ do not accept `-std=gnu99` option.
2019-09-13 02:23:16 +09:00
Yukihiro "Matz" Matsumoto
5a0204bb45
Remove unnecessary files from mruby-{io,pack,socket}.
2019-09-13 02:23:16 +09:00
Yukihiro "Matz" Matsumoto
915bb4e206
Merge pull request #4703 from shuujii/refine-tasks-toolchains-gcc-clang.rake
...
Refine `tasks/toolchains/(gcc|clang).rake`
2019-09-12 22:53:47 +09:00
KOBAYASHI Shuji
07c6b7f0ab
Refine tasks/toolchains/(gcc|clang).rake
...
- Make sure to specify `-std=gnu99` for C compiler flag.
- Make sure to specify `-Wzero-length-array` for C/C++ compiler flag (Clang).
- Extract similar codes.
2019-09-12 21:45:47 +09:00
Yukihiro "Matz" Matsumoto
231a1d68b0
Remove $/ from mruby implementation.
...
1. `$/` and other Perl-ish global variables are not defined in ISO.
2. The current Ruby policy do not encourage those variables.
3. Those variables has global effect and can cause troubles.
2019-09-12 21:22:59 +09:00
Yukihiro "Matz" Matsumoto
6bbdb97e75
Merge pull request #4527 from lopopolo/string-each-line-paragraph-mode
...
Add paragraph mode to String#each_line in mrblib
2019-09-12 21:19:42 +09:00
Yukihiro "Matz" Matsumoto
b98bf36a15
Use mrb_str_inspect instead of mrb_str_dup; fix #4678
2019-09-12 17:15:55 +09:00
Yukihiro "Matz" Matsumoto
9383e9d469
Removed unnecessary files from mruby-sleep; #4702
2019-09-12 06:54:09 +09:00
Yukihiro "Matz" Matsumoto
13c3802073
Remove Rakefile from mruby-sleep gem; fix #4702
...
The `Rakefile` was a leftover from the time it was an independent gem.
2019-09-11 20:28:52 +09:00
Yukihiro "Matz" Matsumoto
04b098d000
Move tests related to getbyte, setbyte, byteslice` to core.
2019-09-11 18:49:08 +09:00
Yukihiro "Matz" Matsumoto
8c90b5fc6a
Fixed length for IO should be in bytes, not in characters; #4696
...
E.g. `io.read(5)` should read 5 byte string, not 5 characters.
2019-09-11 18:47:39 +09:00
Yukihiro "Matz" Matsumoto
ec3aeede20
Move String#{getbyte,setbyte,byteslice} to the core; #4696
...
Unlike CRuby, there's no way to process strings byte-wise by core
methods because there's no per string encoding in mruby, so that
we moved 3 byte-wise operation methods from `mruby-string-ext` gem.
2019-09-11 18:47:39 +09:00
Yukihiro "Matz" Matsumoto
08d4e7c0c4
Merge pull request #4701 from shuujii/drop-test-dependency-from-mruby-string-ext-to-mruby-enumerator
...
Drop test dependency from `mruby-string-ext` to `mruby-enumerator`
2019-09-11 18:47:27 +09:00
KOBAYASHI Shuji
fab781cf8b
Drop test dependency from mruby-string-ext to mruby-enumerator
2019-09-11 10:35:52 +09:00
Yukihiro "Matz" Matsumoto
896f3fe703
Merge pull request #4700 from shuujii/refine-documentation-for-C99-compliance
...
Refine documentation for C99 compliance; ref #4685 [ci skip]
2019-09-10 17:00:29 +09:00
KOBAYASHI Shuji
1c1ebb1833
Refine documentation for C99 compliance; ref #4685 [ci skip]
...
The refinement was based on comment from @matz.
2019-09-10 16:49:14 +09:00
Yukihiro "Matz" Matsumoto
080f7baeaf
Merge pull request #4699 from takkaw/mirb_lv_under_score
...
add special local variable _ in mirb
2019-09-10 09:24:27 +09:00
takkaw
3f70e3a81f
change _ variable in mirb to be enable by default
2019-09-09 23:40:51 +09:00
Yukihiro "Matz" Matsumoto
9d9cb0ab6a
Fix mod.constants not to have duplicate constant names; #4698
...
The fix was based on PR from @dearblue
2019-09-09 23:14:07 +09:00
Yukihiro "Matz" Matsumoto
a1a838d966
Remove duplication of BasicObject constant; fix #4698
2019-09-09 23:14:07 +09:00
Yukihiro "Matz" Matsumoto
6b157397ba
Merge pull request #4697 from shuujii/fix-Class.new-argument-specs
...
Fix `Class.new` argument specs
2019-09-09 22:51:15 +09:00
takkaw
e28451585d
add special local variable _ in mirb
2019-09-09 22:32:10 +09:00
KOBAYASHI Shuji
b156aa2cf6
Fix Class.new argument specs
2019-09-09 21:37:35 +09:00
Yukihiro "Matz" Matsumoto
715afd6fdb
Merge pull request #4695 from dearblue/promote-to-int
...
Fix `mrb_vformat()` crashes with `MRB_INT16`
2019-09-08 22:46:25 +09:00
Yukihiro "Matz" Matsumoto
801343b56b
Merge pull request #4694 from shuujii/optimize-mrb_bool-with-MRB_WORD_BOXING
...
Optimize `mrb_bool()` with `MRB_WORD_BOXING`
2019-09-08 22:44:07 +09:00
dearblue
311d867deb
Fix mrb_vformat() crashes with MRB_INT16
...
If `MRB_INT16` is specified, the variable length argument `mrb_int` is
converted to `int`.
2019-09-08 20:31:35 +09:00
KOBAYASHI Shuji
d47bd0a2cd
Optimize mrb_bool() with MRB_WORD_BOXING
2019-09-08 12:17:25 +09:00
Yukihiro "Matz" Matsumoto
9d08025b8b
Revert part of #4225
...
Since in mruby, Integer and Float interchange frequently (mostly on
overflow), so adding explicit `.0` can cause problems sometimes.
For example:
https://github.com/mattn/mruby-json/pull/40
https://github.com/pepabo/mruby-msd/pull/13
https://github.com/mattn/mruby-json/pull/42
2019-09-07 22:27:30 +09:00
Yukihiro "Matz" Matsumoto
8f04d6561f
Merge pull request #4693 from shuujii/increase-symbol-bit-size-on-32-bit-mode-with-MRB_WORD_BOXING
...
Increase symbol bit size on 32-bit mode with `MRB_WORD_BOXING`
2019-09-07 22:16:54 +09:00
KOBAYASHI Shuji
17c53040ab
Increase symbol bit size on 32-bit mode with MRB_WORD_BOXING
...
This change increases the max length of lower inline symbols to 5 bytes.
2019-09-07 21:38:11 +09:00