summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-10-14support exception when lock_rec > 0Koichi Sasada
If a ractor getting a VM lock (monitor) raises an exception, unlock can be skipped. To release VM lock correctly on exception (or other jumps with JUMP_TAG), EC_POP_TAG() releases VM lock. Notes: Merged: https://github.com/ruby/ruby/pull/3654
2020-10-14* 2020-10-14 [ci skip]git
2020-10-14remove useless semicolonsKoichi Sasada
2020-10-13Use %VCVARS%Nobuyoshi Nakada
2020-10-13* 2020-10-13 [ci skip]git
2020-10-13test/ruby/test_fiber.rb: Suppress "assigned but unused variable" warningsYusuke Endoh
2020-10-12spec/ruby/library/socket/socket/listen_spec.rb: Allow both EACCES and EOPNOSUPPYusuke Endoh
on Android
2020-10-12relax Fiber#transfer's restrictionKoichi Sasada
Using Fiber#transfer with Fiber#resume for a same Fiber is limited (once Fiber#transfer is called for a fiber, the fiber can not be resumed more). This restriction was introduced to protect the resume/yield chain, but we realized that it is too much to protect the chain. Instead of the current restriction, we introduce some other protections. (1) can not transfer to the resuming fiber. (2) can not transfer to the yielding fiber. (3) can not resume transferred fiber. (4) can not yield from not-resumed fiber. [Bug #17221] Also at the end of a transferred fiber, it had continued on root fiber. However, if the root fiber resumed a fiber (and that fiber can resumed another fiber), this behavior also breaks the resume/yield chain. So at the end of a transferred fiber, switch to the edge of resume chain from root fiber. For example, root fiber resumed f1 and f1 resumed f2, transferred to f3 and f3 terminated, then continue from the fiber f2 (it was continued from root fiber without this patch). Notes: Merged: https://github.com/ruby/ruby/pull/3636
2020-10-12Make the test suite pass on real Android/Termux environmentYusuke Endoh
Attempting to create a hard link raises EACCES
2020-10-12[ci skip] Minor documentation fix.Cristian Greco
Add missing period. Notes: Merged: https://github.com/ruby/ruby/pull/3650
2020-10-12change rb_ractor_queue to ring buffertompng
Notes: Merged: https://github.com/ruby/ruby/pull/3642
2020-10-12ractor.rb - indent comment code [ci skip]MSP-Greg
Notes: Merged: https://github.com/ruby/ruby/pull/3648
2020-10-12bignum.c (bary_sparse_p): do not comsume Random::DEFAULTYusuke Endoh
It uses random to determine if the bignum is sparse or not. It is arguable if three-digit samples are enough or not to determine it, but anyway, consuming Random source implicitly is not good. I introduced the random sampling mechanism, and I don't know any significant reason to do so. So, let's remove it. This change makes the sampling points fixed: 40th, 50th, and 60th percentiles.
2020-10-12bignum.c (rb_int_powm): Integer#pow(0, 1) should return 0Yusuke Endoh
... instead of 1 because it requires "modulo 1". [Bug #17257]
2020-10-12Respectively, instead of respentivelyVictor Goff
Notes: Merged: https://github.com/ruby/ruby/pull/3651
2020-10-12* 2020-10-12 [ci skip]git
2020-10-12Prohibit setter method names in all kinds of endless methodsNobuyoshi Nakada
Also unwrap NODE_RIPPER to check the method name. Notes: Merged: https://github.com/ruby/ruby/pull/3649
2020-10-11Adjusted indents [ci skip]Nobuyoshi Nakada
2020-10-11Respect the original styles [ci skip]Nobuyoshi Nakada
2020-10-11[ruby/io-console] Refined getch warningsNobuyoshi Nakada
https://github.com/ruby/io-console/commit/f84e6abcce
2020-10-11[ruby/io-console] Relaxed min: option warningNobuyoshi Nakada
When `min: 0` is given to `IO#getch` with `time:` option, it is expected to return nil if timed out, and needed for source code the compatibility with unixen platforms. https://github.com/ruby/io-console/commit/a2afbe72bd
2020-10-11[ruby/io-console] Fix timeout type error (#18)Nobuyoshi Nakada
Fixed TypeError when IO#getch timed out `rb_io_wait` returns a bit-flags Integer representing available events, or Qfalse if timed out. Also the result of `NUM2INT` is not a `VALUE`. ``` $ ./bin/ruby -v -rio/console -e "p IO.console.getch(intr: true, time: 0.1)" ruby 3.0.0dev (2020-10-09T20:27:30Z master 5ea2ea74cc) [x64-mingw32] -e:1:in `getch': no implicit conversion of false into Integer (TypeError) from -e:1:in `<main>' ``` https://github.com/ruby/io-console/commit/3bdfaf62df
2020-10-11* 2020-10-11 [ci skip]git
2020-10-11[ruby/io-console] Fixed "Rework console to use `rb_io_wait`."Nobuyoshi Nakada
* Fixed backward compatibility. * Added missing `rb_scheduler_timeout` declaration. https://github.com/ruby/io-console/commit/813806079f
2020-10-10Add Ractor#receive and Ractor.receive and use it in all placesBenoit Daloze
* Keep Ractor#recv/Ractor.recv as an alias for now. Notes: Merged: https://github.com/ruby/ruby/pull/3626
2020-10-10Update RBS to 0.13.1 (#3645)Soutaro Matsumoto
Notes: Merged-By: soutaro <matsumoto@soutaro.com>
2020-10-10Improve doc in rb_class_real doc (#3637)S.H
Notes: Merged-By: marcandre <github@marc-andre.ca>
2020-10-10Fixed typo in commentIkko Ashimine
alway -> always Notes: Merged: https://github.com/ruby/ruby/pull/3646
2020-10-10* 2020-10-10 [ci skip]git
2020-10-10remove debug codeKoichi Sasada
2020-10-09Let bundled_gems specify commits to test (#3641)Soutaro Matsumoto
Notes: Merged-By: soutaro <matsumoto@soutaro.com>
2020-10-09Refactored lex_context managementNobuyoshi Nakada
Save and restore `lex_context` as-is wholely, and save in `k_class` and `k_module` to workaround look-ahead reading.
2020-10-09rb_const_set sets the class path nowNobuyoshi Nakada
2020-10-09rb_class_real never returns QnilNobuyoshi Nakada
2020-10-08Fix lldb disassembler so it works with core filesAaron Patterson
This fixes the lldb disassembler script so that it doesn't need a live process when disassembling rb_iseq_t. I also added the PC to the output so you can tell what the VM is executing when it crashed. For example: ``` (lldb) rbdisasm ec->cfp->iseq PC IDX insn_name(operands) 0x56039f0a1720 0000 nop 0x56039f0a1728 0001 getlocal_WC_1( 5 ) 0x56039f0a1738 0003 branchunless( 7 ) 0x56039f0a1748 0005 getlocal_WC_0( 3 ) 0x56039f0a1758 0007 putstring( (VALUE)0x56039f0c7eb8 ) 0x56039f0a1768 0009 opt_send_without_block( (struct rb_call_data *)0x56039f09f140 ) 0x56039f0a1778 0011 pop 0x56039f0a1780 0012 getglobal( ID: 0x7fd7 ) 0x56039f0a1790 0014 branchunless( 7 ) 0x56039f0a17a0 0016 getlocal_WC_0( 3 ) 0x56039f0a17b0 0018 putstring( (VALUE)0x56039f0c7e90 ) 0x56039f0a17c0 0020 opt_send_without_block( (struct rb_call_data *)0x56039f09f150 ) 0x56039f0a17d0 0022 pop 0x56039f0a17d8 0023 getlocal_WC_0( 3 ) 0x56039f0a17e8 0025 putobject( (VALUE)0x56039f0c7e68 ) 0x56039f0a17f8 0027 getlocal_WC_1( 6 ) 0x56039f0a1808 0029 dup 0x56039f0a1810 0030 checktype( 5 ) 0x56039f0a1820 0032 branchif( 4 ) 0x56039f0a1830 0034 dup 0x56039f0a1838 0035 opt_send_without_block( (struct rb_call_data *)0x56039f09f160 ) 0x56039f0a1848 0037 tostring 0x56039f0a1850 0038 putobject( (VALUE)0x56039f0c7e40 ) 0x56039f0a1860 0040 concatstrings( 3 ) 0x56039f0a1870 0042 opt_send_without_block( (struct rb_call_data *)0x56039f09f170 ) 0x56039f0a1880 0044 nop 0x56039f0a1888 0045 leave (lldb) p ec->cfp->pc (const VALUE *) $146 = 0x000056039f0a1848 ``` Here we can see the VM is currently executing `opt_send_without_block` (because the PC is one ahead of the current instruction)
2020-10-09* 2020-10-09 [ci skip]git
2020-10-08Enhanced RDoc for String#insert (#3643)Burdette Lamar
* Enhanced RDoc for String#insert Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2020-10-08Expose assert, assert_respond_to and assert_not_respond_to for default gems.Hiroshi SHIBATA
2020-10-08Promote prettyprint to default gemsHiroshi SHIBATA
2020-10-08Promote pp to default gemsHiroshi SHIBATA
2020-10-08* 2020-10-08 [ci skip]git
2020-10-07Add missing WB for iseqAaron Patterson
The write barrier wasn't being called for this object, so add the missing WB. Automatic compaction moved the reference because it didn't know about the relationship (that's how I found the missing WB).
2020-10-07Revert "Don't export rb_callable_receiver"Nobuyoshi Nakada
This reverts commit c839168b1141db53bedef771d1bc78908b6ac782. `rb_callable_receiver` does not need to be exposed under include.
2020-10-06Prevent objects from moving while iterating the heapAaron Patterson
This iterator uses an st_table, but if objects move the references in the st table won't be updated. This patch just changes the st table to an identity hash. Notes: Merged: https://github.com/ruby/ruby/pull/3634
2020-10-06Don't export rb_callable_receiverChris Seaton
Notes: Merged: https://github.com/ruby/ruby/pull/3629
2020-10-06Use proc_binding rather than rb_funcallChris Seaton
FIX Notes: Merged: https://github.com/ruby/ruby/pull/3629
2020-10-06Make `marshal_load` publicAaron Patterson
Ruby specs expected this method to be public
2020-10-06[lib/ostruct] Fix Marshal loadingMarc-Andre Lafortune
2020-10-07* 2020-10-07 [ci skip]git
2020-10-06No longer need libtoolNobuyoshi Nakada
As debug_counter.c has had a global symbol since cdc614cd0a21, ranlib should no longer complain that it has no symbols.