Yukihiro "Matz" Matsumoto
391b5aa0d8
Merge pull request #4281 from yui-knk/typos [ci skip
...
Fix typos
2019-02-17 22:11:32 +09:00
yui-knk
f614eed13a
Fix typos
2019-02-17 21:34:33 +09:00
Yukihiro "Matz" Matsumoto
21933b7790
Merge pull request #4278 from shuujii/add-length-argument-for-sym_inline_unpack
...
Add length argument for `sym_inline_unpack()`
2019-02-16 21:52:39 +09:00
KOBAYASHI Shuji
2c8af128f4
Add length argument for sym_inline_unpack()
...
`sym_inline_unpack_with_bit()` is moved inside of `sym_inline_unpack()`
because this is used only one place.
2019-02-16 20:48:33 +09:00
Yukihiro "Matz" Matsumoto
c769013f9b
Merge pull request #4277 from shuujii/extract-code-fragment-for-unpacking-in-sym_inline_unpack
...
Extract code fragment for unpacking into method in `sym_inline_unpack()`
2019-02-15 20:12:49 +09:00
KOBAYASHI Shuji
5b10439f6f
Extract code fragment for unpacking into method in sym_inline_unpack()
2019-02-15 19:48:00 +09:00
Yukihiro "Matz" Matsumoto
cc94c8bf9d
Merge pull request #4276 from shuujii/use-assert-for-checking-sym-in-sym_inline_unpack
...
Use `mrb_assert()` for checking `sym` in `sym_inline_unpack()`
2019-02-15 16:34:18 +09:00
Yukihiro "Matz" Matsumoto
702a868b86
Merge pull request #4275 from shuujii/add-const-to-pack_table-in-symbol.c
...
Add `const` to `pack_table` in `src/symbol.c`
2019-02-14 20:12:03 +09:00
KOBAYASHI Shuji
921af6923d
Use mrb_assert() for checking sym in sym_inline_unpack()
2019-02-14 18:48:41 +09:00
KOBAYASHI Shuji
bedd672571
Add const to pack_table to src/symbol.c
2019-02-14 18:44:00 +09:00
Yukihiro "Matz" Matsumoto
01c908117d
Merge pull request #4274 from shuujii/lazy-message-diff-creation-for-assertion
...
Lazy message/diff creation for assertion in `test/assert.rb`
2019-02-14 13:10:48 +09:00
KOBAYASHI Shuji
6cdac5efb6
Lazy message/diff creation for assertion in test/assert.rb
...
Include the following changes too:
- Extract part of logic with block to a method
- Use `var ||= ...` instead of `var = ... unless var`
- Unify using parentheses for `t_print`
- Change methods order
2019-02-14 09:04:42 +09:00
Yukihiro "Matz" Matsumoto
a6c0aa8306
Merge pull request #4269 from shuujii/always-through-assert_true-for-assertion
...
Always through `assert_true` for assertion methods in `test/assert.rb`
2019-02-13 07:10:13 +09:00
Yukihiro "Matz" Matsumoto
ae5ff737e0
Merge pull request #4273 from shuujii/refine-mruby-bin-config-mrbgem.rake
...
Refine `mrbgems/mruby-bin-config/mrbgem.rake`
2019-02-13 07:09:07 +09:00
KOBAYASHI Shuji
c592c093aa
Refine mrbgems/mruby-bin-config/mrbgem.rake
...
- Use `MRuby::Gem::Specification`
- Fix a binary name is added to `MRuby::Build#bins` multiple times
- Close file immediately (avoid using `open(...).read`)
- Simplify
2019-02-12 21:45:38 +09:00
Yukihiro "Matz" Matsumoto
37bc343e0a
Disable Symbol.all_symbols.
2019-02-12 17:30:34 +09:00
Yukihiro "Matz" Matsumoto
06ba5905f0
Implement inline packed symbols.
...
Small symbols with all alphanumeric characters (<5) are packed in 32bit
symbol integer a la base64. This means those small symbols are not
listed in `Symbol.all_symbols`.
2019-02-12 17:30:34 +09:00
Yukihiro "Matz" Matsumoto
3a95bf0ddb
Merge pull request #4272 from shuujii/refactor-for-node_back_ref-in-codegen
...
Small refactoring in `codegen.c`
2019-02-11 22:47:43 +09:00
KOBAYASHI Shuji
c6e2d91536
Small refactoring in codegen.c
2019-02-11 21:09:40 +09:00
Yukihiro "Matz" Matsumoto
ef93ff6405
Should not copy keys&values when a hash table is empty; fix #4270
2019-02-11 15:20:34 +09:00
Yukihiro "Matz" Matsumoto
639f6e2799
No strict argument check for blocks when keyword arguments exist; ref #4270
2019-02-11 15:20:34 +09:00
Yukihiro "Matz" Matsumoto
55e58d8512
Merge pull request #4268 from dearblue/null-safe-mrb_open_core
...
NULL safed `mrb_open_core()`
2019-02-10 08:58:10 +09:00
KOBAYASHI Shuji
e60f5f5cee
Always through assert_true for assertion methods in test/assert.rb
2019-02-09 21:48:12 +09:00
dearblue
eb6aee117b
mrb_default_allocf() is default allocator for NULL safe
2019-02-09 20:22:08 +09:00
Yukihiro "Matz" Matsumoto
fc883de458
Merge pull request #4266 from shuujii/add-no_method_error-tests-to-enumerator
...
Add `NoMethodError` tests to `mruby-enumerator`
2019-02-08 23:28:38 +09:00
KOBAYASHI Shuji
19740d45a1
Add NoMethodError tests to mruby-enumerator
2019-02-08 17:40:12 +09:00
Yukihiro "Matz" Matsumoto
3d73a29783
Merge branch 'shuujii-fix-enumerator-initialize-for-nil-or-false'
2019-02-08 09:35:34 +09:00
Yukihiro "Matz" Matsumoto
e0bc87297e
Update mruby-enumerator test to conform the last update.
2019-02-08 09:35:28 +09:00
Yukihiro "Matz" Matsumoto
9ab7c1111b
Update #4265 patch.
...
* Update doc comment to clarify `Enumerator.new` without a block is
deprecated and left only for internal use.
* Fixed some cases `mruby` raise `ArgumentError` too eagerly compared
with `CRuby`.
2019-02-08 09:35:28 +09:00
KOBAYASHI Shuji
2650999092
Fix Enumerator#(initialize|inspect) for nil/false
2019-02-08 09:35:28 +09:00
Yukihiro "Matz" Matsumoto
c32e3158f5
Update mruby-enumerator test to conform the last update.
2019-02-08 09:34:31 +09:00
Yukihiro "Matz" Matsumoto
32f3ffa2c9
Update #4265 patch.
...
* Update doc comment to clarify `Enumerator.new` without a block is
deprecated and left only for internal use.
* Fixed some cases `mruby` raise `ArgumentError` too eagerly compared
with `CRuby`.
2019-02-08 09:31:55 +09:00
Yukihiro "Matz" Matsumoto
60529fdeeb
Merge branch 'fix-enumerator-initialize-for-nil-or-false' of https://github.com/shuujii/mruby into shuujii-fix-enumerator-initialize-for-nil-or-false
2019-02-08 09:13:39 +09:00
Yukihiro "Matz" Matsumoto
687a4d961f
Merge pull request #4251 from shuujii/remove-no-meaning-statements-in-mruby-io-tests
...
Remove no meaning statements in `mruby-io` tests
2019-02-08 07:19:40 +09:00
KOBAYASHI Shuji
e846db709f
Fix Enumerator#(initialize|inspect) for nil/false
2019-02-07 23:52:08 +09:00
Yukihiro "Matz" Matsumoto
bdc9de875f
Add OP_ENTER to blocks without parameters; fix #4175
...
So that `lambda{}.call(1)` raises `ArgumentError` as CRuby does.
Also, fixed junk assignment for `lambda{|;a|p a}.call{}`.
2019-02-07 22:44:36 +09:00
Yukihiro "Matz" Matsumoto
156641515c
Merge branch 'shuujii-rename-bin-mruby-config-to-bin-config'
2019-02-07 15:54:08 +09:00
Yukihiro "Matz" Matsumoto
e199df032d
Merge branch 'rename-bin-mruby-config-to-bin-config' of https://github.com/shuujii/mruby into shuujii-rename-bin-mruby-config-to-bin-config
2019-02-07 15:52:58 +09:00
Yukihiro "Matz" Matsumoto
6397ec727f
Raise NameError for symbol struct access.
2019-02-07 15:52:33 +09:00
Yukihiro "Matz" Matsumoto
215906dc83
Merge pull request #4264 from shuujii/integrate-definition-of-exefile
...
Integrate definition of `MRuby::Build#exefile`
2019-02-07 07:05:05 +09:00
Yukihiro "Matz" Matsumoto
d52f46da45
Implement symbol hash table to boost find_symbol.
...
In 4174e02, we removed the symbol hash table from `mrb_state` but
`find_symbol` was too slow with linear search. My performance estimation
was wrong. So we implemented a new compact hash table for symbols.
2019-02-06 22:07:11 +09:00
Yukihiro "Matz" Matsumoto
905fef2669
Reduce invocation of mrb_convert_type() from mrb_str_to_str().
2019-02-06 22:07:11 +09:00
Yukihiro "Matz" Matsumoto
02fbb2c211
Remove symbol hash table from mrb_state structure.
...
Use linear search instead. Number of symbols is usually small (<1K), so
we don't need performance boost from hash tables. In our benchmark
measurement, hash tables consumes 790KB for `build/full-debug/mrbtest`.
2019-02-06 22:07:11 +09:00
KOBAYASHI Shuji
c8628f7ca4
Integrate definition of MRuby::Build#exefile
2019-02-06 22:05:10 +09:00
Yukihiro "Matz" Matsumoto
1076bebde7
Merge pull request #4256 from shuujii/move-none-to-mrblib-enum
...
Move `NONE` to `mrblib/enum.rb`
2019-02-06 20:18:45 +09:00
Yukihiro "Matz" Matsumoto
cb8bbd9e12
Merge pull request #4262 from shuujii/remove-old-comment-in-symbol
...
Remove old comment for `mrb_sym2name_len()` [ci skip]
2019-02-05 22:51:26 +09:00
Yukihiro "Matz" Matsumoto
f51c0f5a59
Merge pull request #4261 from shuujii/fix-doc-markup-in-string
...
Fix markup and remove unneeded comment for doc in `src/string.c` [ci skip]
2019-02-05 22:50:56 +09:00
KOBAYASHI Shuji
5ef1e479da
Remove old comment for mrb_sym2name_len() [ci skip]
2019-02-05 19:16:23 +09:00
KOBAYASHI Shuji
7a2865cfef
Fix markup and remove unneeded comment for doc in src/string.c [ci skip]
2019-02-05 19:11:59 +09:00
Yukihiro "Matz" Matsumoto
db2545cb3c
Merge pull request #4260 from shuujii/fix-symbol-size-with-mrb_utf8_string
...
Fix `Symbol#size` for multi-byte characters with `MRB_UTF8_STRING`
2019-02-04 21:11:06 +09:00