aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Add String#byteindex, String#byterindex, and MatchData#byteoffset (#5518)Shugo Maeda2022-02-195-9/+451
| | | | | | * Add String#byteindex, String#byterindex, and MatchData#byteoffset [Feature #13110] Co-authored-by: NARUSE, Yui <naruse@airemix.jp>
* Find pattern is no longer experimental [Feature #18585]Kazuki Tsujimoto2022-02-193-23/+4
|
* Fix location of NODE_LIT in p_kwKazuki Tsujimoto2022-02-191-1/+1
|
* Use symbols for clock IDs if `clockid_t` is not numericNobuyoshi Nakada2022-02-191-19/+134
|
* Set static IDs to same name variablesNobuyoshi Nakada2022-02-191-30/+31
|
* RUBY_REPLACE_TYPE: check if the target type is a pointerNobuyoshi Nakada2022-02-191-1/+11
|
* [DOC] prefer rdoc references over generated URLsNobuyoshi Nakada2022-02-192-15/+15
|
* Enhanced RDoc for io.c (#5573)Burdette Lamar2022-02-181-61/+81
| | | | | Links to options doc added/improved; in particular, new links to new section "Encoding Options" in encoding.rdoc. Minor inconsistencies ironed out.
* * 2022-02-19 [ci skip]git2022-02-191-1/+1
|
* New doc about encoding (#5572)Burdette Lamar2022-02-181-0/+260
| | | | | | | | This is the beginning of an extended explication of Ruby encoding. One of its more important jobs is to provide link targets for encoding documentation in other classes (String, File, IO, etc.). In particular, they can link to the "Encoding Options" section. I'll have much to add to this document going forward, along with suitable adjustments in the class documentation.
* Remove unused function declaration in dln.cPeter Zhu2022-02-181-4/+0
| | | | getenv is no longer used in dln.c.
* LONG2NUM() should be used for rmatch_offset::{beg,end}Shugo Maeda2022-02-181-4/+4
| | | | https://github.com/ruby/ruby/pull/5518#discussion_r809645406
* Enhanced RDoc concerning command injection (#5537)Burdette Lamar2022-02-184-26/+79
| | | | | | | | | | | | | | | | Clarifies security vulnerabilities for commands. Treats: Kernel.system Kernel.` (backtick) IO.popen IO.read IO.write IO.binread IO.binwrite IO.readlines IO.foreach
* gen-mail.rb: support markdown file pathNARUSE, Yui2022-02-181-4/+9
|
* [wasm] vm.c: stop unwinding to main for every vm_exec call by setjmpYuta Saito2022-02-184-0/+194
| | | | | | | | | | | | | | | | | | | | | | | | the original rb_wasm_setjmp implementation always unwinds to the root call frame to have setjmp compatible interface, and simulate sjlj's undefined behavior. Therefore, every vm_exec call unwinds to main, and a deep call stack makes setjmp call very expensive. The following snippet from optcarrot takes 5s even though it takes less than 0.3s on native. ``` [0x0, 0x4, 0x8, 0xc].map do |attr| (0..7).map do |j| (0...0x10000).map do |i| clr = i[15 - j] * 2 + i[7 - j] clr != 0 ? attr | clr : 0 end end end ``` This patch adds a WASI specialized vm_exec which uses lightweight try-catch API without unwinding to the root frame. After this patch, the above snippet takes only 0.5s.
* Mention Set as a new builtin class to NEWSAkinori MUSHA2022-02-181-0/+5
|
* Make Set a builtin feature [Feature #16989]Akinori MUSHA2022-02-183-1/+49
|
* * 2022-02-18 [ci skip]git2022-02-181-1/+1
|
* Add Thread.each_caller_locationJeremy Evans2022-02-172-5/+66
| | | | | | | | This method takes a block and yields Thread::Backtrace::Location objects to the block. It does not take arguments, and always starts at the default frame that caller_locations would start at. Implements [Feature #16663]
* Do not search for commands with double tool prefixes [Bug #18504]Nobuyoshi Nakada2022-02-171-19/+23
| | | | | | The `CC` found by `AC_CHECK_TOOL` is prefixed by the host triplet when cross compiling. To search for commands with `AC_CHECK_TOOL` based on that `CC` means to search also doubly prefixed names.
* Refine the load error messageNobuyoshi Nakada2022-02-171-5/+27
| | | | | Show the linked ruby library name when failed to load extension built against different ruby library.
* Check running macOS version at runtimeNobuyoshi Nakada2022-02-171-8/+27
|
* Reuse `-v` option result as `target_platform`Nobuyoshi Nakada2022-02-171-6/+5
| | | | | | Backticks method invokes `/bin/sh` when the command contains quotes, and `sh` clears some environment variables set in runruby.rb to search the built shared library.
* exclude name must be Regexp or SymbolKazuhiro NISHIYAMA2022-02-171-1/+1
| | | | https://github.com/ruby/ruby/blob/fdf0f8d81487560f5837dc7e3888a96f7c2b4ec9/tool/lib/test/unit.rb#L1273-L1290
* btest-ruby OPTS=-v should disable quietKoichi Sasada2022-02-171-0/+2
| | | | | `make btest-ruby` is run with -q (quiet) option and -v should remove -q option.
* Hide patchlevel from release buildHiroshi SHIBATA2022-02-171-1/+1
|
* yjit_codegen.c: Prevent a possible out-of-bound accessYusuke Endoh2022-02-171-1/+1
| | | | | | | | | The code attempts to read `C_ARG_REGS[leaf_builtin->argc + 1]`, and the size of `C_ARG_REGS` is `NUM_C_ARG_REGS`. So, the guard condition must be `leaf_builtin->argc + 1 + 1 <= NUM_C_ARG_REGS`. This change fixes the off-by-one error. This issue was found by Coverity Scan.
* * 2022-02-17 [ci skip]git2022-02-171-1/+1
|
* Fix -Wsign-compare when -DRUBY_DEBUG=1Alan Wu2022-02-161-1/+1
| | | Sizes for darray are size_t now. CC @peterzhu2118
* Change feature_index from fake Array to darrayPeter Zhu2022-02-162-55/+89
| | | | | | | | Using a fake (malloc) RArray is not friendly for the garbage collector. Fake RArray does not have a heap page, so it causes Variable Width Allocation to crash when we try to implement it on Arrays. This commit changes feature_index from a RArray to a darray.
* Change darray size to size_t and add functions that use GC mallocPeter Zhu2022-02-166-63/+92
| | | | | | | Changes size and capacity of darray to size_t to support more elements. Adds functions to darray that use GC allocation functions.
* Parenthesize a macro expressionNobuyoshi Nakada2022-02-161-1/+1
| | | | The modulo in `rb_yjit_code_page_alloc` seems interpreted wrongly.
* fix parallel test timeout retryingKoichi Sasada2022-02-161-1/+13
| | | | | | | | | On the parallel test, workers can be killed because of timeout and the information for the retrying can be inconsistent. This patch will skip if the inconsistency is found and report as an error. http://ci.rvm.jp/results/trunk-asserts@phosphorus-docker/3834082
* lib/securerandom.rb: Fix the check of availability of Random.urandomYusuke Endoh2022-02-161-4/+5
| | | | | Random.urandom raises a RuntimeError if it is unavailable. [Bug #13885]
* * 2022-02-16 [ci skip]git2022-02-161-1/+1
|
* `wmap#each` should check liveness of keysKoichi Sasada2022-02-161-20/+42
| | | | | `ObjectSpace::WeakMap#each*` should check key's liveness. fix [Bug #18586]
* Use RARRAY_SHARED_ROOT_FLAG for checking re-enterPeter Zhu2022-02-141-3/+3
| | | | | RARRAY_SHARED_ROOT_FLAG is defined as FL_USER5, but we should use RARRAY_SHARED_ROOT_FLAG instead of depending on that they're equal.
* fix GC event synchronizationKoichi Sasada2022-02-141-14/+22
| | | | | | | | | | | | | | (1) gc_verify_internal_consistency() use barrier locking for consistency while `during_gc == true` at the end of the sweep on `RGENGC_CHECK_MODE >= 2`. (2) `rb_objspace_reachable_objects_from()` is called without VM synchronization and it checks `during_gc != true`. So (1) and (2) causes BUG because of `during_gc == true`. To prevent this error, wait for VM barrier on `during_gc == false` and introduce VM locking on `rb_objspace_reachable_objects_from()`. http://ci.rvm.jp/results/trunk-asserts@phosphorus-docker/3830088
* * 2022-02-14 [ci skip]git2022-02-141-1/+1
|
* extend timeout for mjitKoichi Sasada2022-02-141-1/+1
| | | | | 1 seconeds is not enough on an specific (busy) machine w/ mjit. http://ci.rvm.jp/results/trunk-mjit@phosphorus-docker/3830178
* [MSWin] Install OpenSSL with vcpkgNobuyoshi Nakada2022-02-131-3/+4
|
* Exclude TestThread#test_signal_at_join on FreeBSD 13 for now [ci skip]Nobuyoshi Nakada2022-02-131-0/+3
|
* * 2022-02-13 [ci skip]git2022-02-131-1/+1
|
* [DOC] Fix a typo in `Integer#chr` exampleKoichi ITO2022-02-131-1/+1
| | | | | | | | | | | | | | The current example raises the following error. ```ruby 0..chr # => undefined local variable or method `chr' for main:Object (NameError) ``` This PR updates the example to produce the expected behavior. ```ruby 0.chr # => "\x00" ```
* [MSWin] Remove stale configuration check [ci skip]Nobuyoshi Nakada2022-02-121-7/+0
| | | | PSAPI library has not been used since d66c5768caaee16a0c2c2c641185.
* [ruby/rdoc] Load YAML library for each testNobuyoshi Nakada2022-02-121-0/+4
| | | | https://github.com/ruby/rdoc/commit/a93e1bcd68
* [ruby/rdoc] Dump plain objects as `RDoc::Options`Nobuyoshi Nakada2022-02-124-33/+59
| | | | | | So that the generated `.rdoc_options` file is loadable. https://github.com/ruby/rdoc/commit/6cf6e1647b
* [ruby/rdoc] Fix a test method nameNobuyoshi Nakada2022-02-121-1/+1
| | | | https://github.com/ruby/rdoc/commit/8166b84cf3
* [ruby/rdoc] Update generated filesNobuyoshi Nakada2022-02-123-10/+26
|
* [ruby/rdoc] Relative loading for easier development ↵Ulysse Buonomo2022-02-1241-166/+165
| | | | | | | | | | | | | | | (https://github.com/ruby/rdoc/pull/821) This patch makes sure we only load relative code. Hence when coding or testing rdoc, we'll be sure to always be using the correct code. Discussion started at https://github.com/ruby/rdoc/pull/817. Signed-off-by: Ulysse Buonomo <buonomo.ulysse@gmail.com> https://github.com/ruby/rdoc/commit/aa41bd48eb Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>