aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Added some examples to the documentation for String#unpack1 becauseiain barnett2019-08-091-0/+14
| | | | there are currently no examples and to contrast with String#unpack.
* Allow Array#join to allocate smaller stringsJohn Hawthorn2019-08-091-1/+3
| | | | | | | | | | | | | | rb_str_buf_new always allocates at least 127 bytes of capacity, even when less is requested. > ObjectSpace.dump(%w[a b c].join) {"address":"0x7f935f06ebf0", "type":"STRING", "class":"0x7f935d8b7bb0", "bytesize":3, "capacity":127, "value":"abc", "encoding":"UTF-8", "memsize":168, "flags":{"wb_protected":true}} Instead, by using rb_str_new and then setting the length to 0, we can allocate the exact amount of memory needed, without extra capacity. > ObjectSpace.dump(%w[a b c].join) {"address":"0x7f903fcab530", "type":"STRING", "class":"0x7f903f8b7988", "embedded":true, "bytesize":3, "value":"abc", "encoding":"UTF-8", "memsize":40, "flags":{"wb_protected":true}}
* Fix typo: duplicated the [skip-ci]ohbarye2019-08-095-5/+5
|
* Init function is need to link staticallyNobuyoshi Nakada2019-08-101-0/+5
|
* Fix parsing of mutiple assignment with rescue modifierJeremy Evans2019-08-092-0/+14
| | | | | | | | | | | | | | | | | | | Single assignment with rescue modifier applies rescue to the RHS: a = raise rescue 1 # a = (raise rescue 1) Previously, multiple assignment with rescue modifier applied rescue to the entire expression: a, b = raise rescue [1, 2] # (a, b = raise) rescue [1, 2] This makes multiple assignment with rescue modifier consistent with single assignment with rescue modifier, applying rescue to the RHS: a, b = raise rescue [1, 2] # a, b = (raise rescue [1, 2]) Implements [Feature #8239] Fixes [Bug #8279]
* Removed unnecessary headersNobuyoshi Nakada2019-08-101-32/+0
|
* Use ENC_REPLICATE to copy an encodingNobuyoshi Nakada2019-08-101-8/+1
|
* * 2019-08-10git2019-08-101-1/+1
|
* Revert "Removed unused includes"Yusuke Endoh2019-08-102-0/+34
| | | | | | | | | | | | | | | | | | This reverts commit c9eb8f82e9febeb634a23bec6aeea915eb25fe26. The change caused "implicit declaration" warning and actual segfault. ``` /tmp/ruby/v2/src/trunk-gc-asserts/enc/gb2312.c: In function ‘Init_gb2312’: /tmp/ruby/v2/src/trunk-gc-asserts/enc/gb2312.c:6:31: warning: implicit declaration of function ‘rb_enc_find’ [-Wimplicit-function-declaration] rb_enc_register("GB2312", rb_enc_find("EUC-KR")); ^~~~~~~~~~~ /tmp/ruby/v2/src/trunk-gc-asserts/enc/gb2312.c:6:31: warning: passing argument 2 of ‘rb_enc_register’ makes pointer from integer without a cast [-Wint-conversion] <command-line>:0:19: note: expected ‘OnigEncoding {aka const struct OnigEncodingTypeST *}’ but argument is of type ‘int’ /tmp/ruby/v2/src/trunk-gc-asserts/regenc.h:231:12: note: in expansion of macro ‘ONIG_ENC_REGISTER’ extern int ONIG_ENC_REGISTER(const char *, OnigEncoding); ^~~~~~~~~~~~~~~~~ ```
* #include <> for system headersNobuyoshi Nakada2019-08-092-2/+2
|
* Removed unused includesNobuyoshi Nakada2019-08-092-34/+0
|
* gc.c: Double STACKFRAME_FOR_CALL_CFUNC (1024->2048)Yusuke Endoh2019-08-091-1/+1
| | | | | | | ef64ab917eec02491f6bf7233a4031a8c35385e3 didn't fix the issue, so the size seems not enough yet. https://rubyci.org/logs/rubyci.s3.amazonaws.com/osx1014/ruby-master/log/20190809T114503Z.fail.html.gz
* restore timeoutKoichi Sasada2019-08-091-3/+1
|
* gc.c: Increase STACKFRAME_FOR_CALL_CFUNCYusuke Endoh2019-08-091-1/+1
| | | | | | | | On macOS Mojave, the child process invoked in TestFiber#test_stack_size gets stuck because the stack overflow detection is too late. (ko1 figured out the mechanism of the failure.) This change attempts to detect stack overflow earlier.
* Revert a6e32855d079e8f3806d8be8a5f5cf7b3a967133 partiallyKazuhiro NISHIYAMA2019-08-091-1/+1
| | | | Fix TypeError when typing `''.[TAB]`
* complement `test_` prefix.Koichi Sasada2019-08-091-5/+14
| | | | | | | `make test-all TESTS=name` can specify running test files by name. name can be dirname ('dir/') or a file ('.../test_foo.rb'). This patch complement `test_` prefix for a test. So we only need to specify `TESTS=ruby/hash` which means `TESTS=ruby/test_hash.rb`.
* extend timeout to debug.Koichi Sasada2019-08-091-1/+3
|
* gc.h is required on mswin build.Koichi Sasada2019-08-092-0/+2
| | | | thread.c requires gc.h on mswin build. Sorry.
* add rp() and bp() in internal.h.Koichi Sasada2019-08-095-6/+16
| | | | | | | | debug utility macro rp() (rp_m()) and bp() are introduced. * rp(obj) shows obj information w/o any side-effect to STDERR. * rp_m(m, obj) is similar to rp(obj), but show m before. * bp() is alias of ruby_debug_breakpoint(), which is registered as a breakpoint in run.gdb (used by `make gdb` or make gdb-ruby`).
* Add more runnersAaron Patterson2019-08-091-0/+4
| | | | Closes: https://github.com/ruby/ruby/pull/2327
* Run macOS tests on GitHub ActionsAaron Patterson2019-08-091-0/+35
| | | | | | | | | | This commit sets up the CI integration on GitHub Actions. We should give it a try because queue times are lower and I think we get more CPUs. Closes: https://github.com/ruby/ruby/pull/2327 Co-Authored-By: John Hawthorn <john@hawthorn.email>
* remove useless include and dependencyKoichi Sasada2019-08-092-2/+1
|
* double memory limit on MJIT.Koichi Sasada2019-08-091-1/+2
| | | | | On test with MJIT, sometimes it fails like: http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2189967
* Add missing dependencyTakashi Kokubun2019-08-091-0/+1
| | | | | just fix CI failure https://travis-ci.org/ruby/ruby/jobs/569625233
* * expand tabs.git2019-08-091-1/+1
|
* introduce RCLASS_CLONED flag for inline cache.Koichi Sasada2019-08-095-13/+59
| | | | | | | | | Methods on duplicated class/module refer same constant inline cache (IC). Constant access lookup should be done for cloned class/modules but inline cache doesn't check it. To check it, this patch introduce new RCLASS_CLONED flag which are set when if class/module is cloned (both orig and dst). [Bug #15877]
* Enable GitHub Actions on RubyAaron Patterson2019-08-081-0/+0
| | | | This just enables GitHub actions on our repository so we can try it out.
* * expand tabs.git2019-08-091-1/+1
|
* Iseq#to_binary: Add support for NoMatchingPatternError and TypeErrorAlan Wu2019-08-092-0/+22
| | | | | | | | | | Binary dumping the iseq for `case foo in []; end` used to crash as there was no handling for these exception classes. Pattern matching generates these classes as operands to `putobject`. [Bug #16088] Closes: https://github.com/ruby/ruby/pull/2325
* C99 allows trailing comma in enumNobuyoshi Nakada2019-08-091-4/+4
|
* * 2019-08-09git2019-08-091-1/+1
|
* Should require without wrapper moduleNobuyoshi Nakada2019-08-092-0/+20
|
* Remove temporary directory [ci skip]Nobuyoshi Nakada2019-08-081-0/+1
|
* Revert "Drop -j from msys2 build for debugging"Takashi Kokubun2019-08-081-1/+1
| | | | | | | | | | This reverts commit b1594ca3d6b72edb60927418482652ce93209499. Revert "Debug appveyor mingw failure" This reverts commit fa29f65416f1fb3d734a279855728bb0616dbb34. Though I preserved V=1 for future debugging.
* Reduce unnecessary EXEC_TAG in requireNobuyoshi Nakada2019-08-082-26/+57
|
* Arrange installed packages like ruby-locoTakashi Kokubun2019-08-081-5/+1
| | | | | | | | | to fix a build error like: https://ci.appveyor.com/project/ruby/ruby/builds/26547644/job/4j7n41e7in97a9kx Basically copy-pasted what's currently done in MSP-Greg/ruby-loco. Co-Authored-By: MSP-Greg <greg.mpls@gmail.com>
* solve "duplicate :raise event" in require too [Bug #15877]Nobuyoshi Nakada2019-08-082-2/+7
|
* Use `ec` instead of `th->ec` where the `th` came from the `ec`Nobuyoshi Nakada2019-08-081-4/+4
|
* Drop -j from msys2 build for debuggingTakashi Kokubun2019-08-081-1/+1
|
* * expand tabs.git2019-08-081-1/+1
|
* solve "duplicate :raise event" [Bug #15877]Koichi Sasada2019-08-084-36/+24
| | | | | | | Without this patch, "raise" event invoked twice when raise an exception in "load"ed script. This patch by danielwaterworth (Daniel Waterworth). [Bug #15877]
* main.c: Add doxygen mainpageYusuke Endoh2019-08-081-0/+8
| | | | | The document is experimentally produced in: https://rubyci.s3.amazonaws.com/doxygen/modules.html
* Aliases capture_output to capture_io for test-unit compatiblity.Hiroshi SHIBATA2019-08-085-9/+6
|
* Add *_clear methods to VM_COLLECT_USAGE_DETAILS APIGannon McGibbon2019-08-081-0/+53
| | | | | | | Add RubyVM::USAGE_ANALYSIS_INSN_CLEAR, RubyVM::USAGE_ANALYSIS_OPERAND_CLEAR, and RubyVM::USAGE_ANALYSIS_REGISTER_CLEAR to clear VM instruction hash constants. Closes: https://github.com/ruby/ruby/pull/2258
* Add *_start and *_running methods to VM_COLLECT_USAGE_DETAILS APIGannon McGibbon2019-08-081-3/+63
| | | | | | | | | | | Add RubyVM::USAGE_ANALYSIS_INSN_START, RubyVM::USAGE_ANALYSIS_OPERAND_START, and RubyVM::USAGE_ANALYSIS_REGISTER_START to begin collecting VM instructions. Add RubyVM::USAGE_ANALYSIS_INSN_RUNNING, RubyVM::USAGE_ANALYSIS_OPERAND_RUNNING, and RubyVM::USAGE_ANALYSIS_REGISTER_RUNNING to check if VM instructions are being collected. Closes: https://github.com/ruby/ruby/pull/2258
* Add a way to print debug counters without exitingAaron Patterson2019-08-073-0/+9
| | | | | | | | I am trying to study debug counters inside a Rails application. Accessing debug counters by killing the process is hard because child processes don't get the same TRAP as the parent, and Rails seems to intercept calls to `exit`. Adding this method lets me print the debug counters when I want (at the end of requests for example)
* * 2019-08-08git2019-08-081-1/+1
|
* Debug appveyor mingw failureTakashi Kokubun2019-08-081-1/+1
| | | | | | | It has been unstable for recent builds: https://ci.appveyor.com/project/ruby/ruby/builds/26531442/job/0ycp7woekqqx97x9 https://ci.appveyor.com/project/ruby/ruby/builds/26531687/job/xui3rctcvi7r49iv https://ci.appveyor.com/project/ruby/ruby/builds/26532019/job/1q0n46ci4g8dplwx
* array.c: gc.h is not neededYusuke Endoh2019-08-071-1/+0
|
* hash.c: gc.h is needed when HASH_DEBUG modeYusuke Endoh2019-08-071-0/+4
|