aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Removed win32apiHiroshi SHIBATA2020-11-112-28/+0
|
* [ruby/racc] skip the failing test with JRubyHiroshi SHIBATA2020-11-101-0/+2
| | | | https://github.com/ruby/racc/commit/cf37713895
* lib/racc/statetransitiontable.rb: Make the racc output stableYusuke Endoh2020-11-1021-7523/+7507
| | | | | | | | | Racc calls `Array#sort!` to build a state transition table. As `Array#sort!` is not a stable sort, the output may differ depending upon the environment. This changeset makes the sort stable manually, and updates all expectation files.
* `fe80` should be case insensitive tooKazuhiro NISHIYAMA2020-11-091-0/+3
|
* Fix TestFiberMutex#test_condition_variable assertionBenoit Daloze2020-11-081-5/+3
| | | | * Now that it works correctly.
* test/resolv/test_dns.rb: suppress "assigned but unused variable"Yusuke Endoh2020-11-081-1/+1
|
* Urgent notification pipe has same lifetime as scheduler.Samuel Williams2020-11-081-11/+10
|
* Defer `kernel_sleep` to `block` to avoid exiting the event loop when ↵Samuel Williams2020-11-081-6/+1
| | | | duration is nil.
* Add support for IPv6 link local addresses to resolvJeremy Evans2020-11-071-0/+19
| | | | | | | | | | Now that it should work correctly, test that every address returned by Socket.ip_address_list is resolvable. Socket works with IPv6 link local addresses, and ipaddr now does as well, so I think resolv should support them. Fixes [Bug #17112]
* Remove sender/message_id pair after response received in resolvJeremy Evans2020-11-071-0/+113
| | | | | | | | | Once a response for a given DNS request has been received (which requires a matching message id), the [sender, message_id] pair should be removed from the list of valid senders. This makes it so duplicate responses from the same sender are ignored. Fixes [Bug #12838]
* Rename to `Fiber#set_scheduler`.Samuel Williams2020-11-076-22/+38
|
* Make Array methods return Array instances instead of subclass instancesJeremy Evans2020-11-031-60/+80
| | | | | | | | | | | | | | | | This changes the following methods to return Array instances instead of subclass instances: * Array#drop * Array#drop_while * Array#flatten * Array#slice! * Array#slice/#[] * Array#take * Array#take_while * Array#uniq * Array#* Fixes [Bug #6087]
* Rightward assignment is replaced by one-line pattern matchingKazuki Tsujimoto2020-11-041-10/+0
|
* test/ruby/test_gc_compact.rb: suppress "assigned but unused variable"Yusuke Endoh2020-11-031-1/+0
|
* Add `GC.auto_compact= true/false` and `GC.auto_compact`Aaron Patterson2020-11-021-0/+65
| | | | | | | | | | * `GC.auto_compact=`, `GC.auto_compact` can be used to control when compaction runs. Setting `auto_compact=` to true will cause compaction to occurr duing major collections. At the moment, compaction adds significant overhead to major collections, so please test first! [Feature #17176]
* ripper: Invalid pragma value warningNobuyoshi Nakada2020-11-021-0/+6
|
* Pattern matching is no longer experimentalKazuki Tsujimoto2020-11-011-2/+2
|
* check isolated Proc more strictlyKoichi Sasada2020-10-291-0/+51
| | | | | Isolated Proc prohibit to access outer local variables, but it was violated by binding and so on, so they should be error.
* Add Thread.ignore_deadlock accessorJeremy Evans2020-10-281-0/+13
| | | | | | | | | | Setting this to true disables the deadlock detector. It should only be used in cases where the deadlock could be broken via some external means, such as via a signal. Now that $SAFE is no longer used, replace the safe_level_ VM flag with ignore_deadlock for storing the setting. Fixes [Bug #13768]
* test/ruby/test_rational.rb: Prevent "assigned but unused variable"Yusuke Endoh2020-10-281-1/+1
|
* Revert "Fixed typo"Nobuyoshi Nakada2020-10-271-1/+1
| | | | | | This reverts commit 379a5ca539af0e954b1cdf63b9365ad208b9c7f3. This "typo" is intentional to test the transposition detection by did_you_mean.
* Fixed typoHiroshi SHIBATA2020-10-271-1/+1
|
* Allow non-argument endless-def with a space instead of parenthesesNobuyoshi Nakada2020-10-261-2/+2
|
* rational.c: convert a numerator to rational before calling fdiv in ↵Kenta Murata2020-10-261-0/+8
| | | | | | Kernel.Rational() (#3702) This makes `Rational(BigDecimal(1), 60) == Rational(1, 60)`. [Bug #16518]
* Assoc pattern matching (#3703)Nobuyoshi Nakada2020-10-263-20/+21
| | | | | [Feature #17260] One-line pattern matching using tASSOC R-assignment is rejected instead.
* numeric.c, range.c: prohibit zero stepKenta Murata2020-10-233-28/+19
| | | | | | | | | * numeric.c: prohibit zero step in Numeric#step * range.c: prohibit zero step in Range#step * Fix ruby-spec [Feature #15573]
* rational.c: try converting by to_int in Rational() (#3684)Kenta Murata2020-10-221-0/+19
| | | [Bug #12485]
* test/json/json_parser_test.rb: suppress warningsYusuke Endoh2020-10-211-2/+2
| | | | | | | | http://rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20201021T123003Z.log.html.gz ``` /home/chkbuild/chkbuild/tmp/build/20201021T123003Z/ruby/test/json/json_parser_test.rb:227: warning: ambiguous first argument; put parentheses or a space even after `-' operator /home/chkbuild/chkbuild/tmp/build/20201021T123003Z/ruby/test/json/json_parser_test.rb:228: warning: ambiguous first argument; put parentheses or a space even after `-' operator ```
* Feature #16812: Allow slicing arrays with ArithmeticSequence (#3241)Kenta Murata2020-10-211-1/+37
| | | | | | | | | | | | | | | | | * Support ArithmeticSequence in Array#slice * Extract rb_range_component_beg_len * Use rb_range_values to check Range object * Fix ary_make_partial_step * Fix for negative step cases * range.c: Describe the role of err argument in rb_range_component_beg_len * Raise a RangeError when an arithmetic sequence refers the outside of an array [Feature #16812]
* strip trailing spaces [ci skip]Nobuyoshi Nakada2020-10-201-1/+1
|
* Fix an issue with generate_pretty and empty objects in the Ruby and Java ↵Chris Seaton2020-10-201-0/+5
| | | | implementations
* Implement a freeze: parser optionJean Boussier2020-10-201-0/+21
| | | | | | | If set to true all parsed objects will be immediately frozen, and strings will be deduplicated if the Ruby implementation allows it.
* range.c: Fix an exception message in rb_range_beg_lenKenta Murata2020-10-201-0/+3
| | | | [Bug #17271]
* Add a Ripper.lex test of :on_embexpr_endTakashi Kokubun2020-10-191-0/+7
| | | | | | | | | This is a weird use case of Ripper.lex which I'm not sure is supposed to be maintained, so I'm adding this test so that we can easily notice such changes. If we change the behavior, this will break the behavior of hamlit.gem v1 and code like https://github.com/haml/haml/pull/1043.
* Revert "test/rinda/test_rinda.rb: try debugging TestRingServer#test_do_reply"Yusuke Endoh2020-10-171-8/+1
| | | | | | This reverts commit de5e8d0e3bc3cc39487ffc9d9c15642b6881cd54. Remove the debugging code that is no longer needed
* Revert "test/rinda/test_rinda.rb: Add more debugging code"Yusuke Endoh2020-10-171-25/+0
| | | | | | This reverts commit ac803ab55db50ef891e3680680620d01f28a759b. Remove debugging code that is no longer needed
* test/rinda/test_rinda.rb: Prevent a callback Proc from being GC'edYusuke Endoh2020-10-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the log of ac803ab55db50ef891e3680680620d01f28a759b, I found that a thread terminates silently due to "recycled object" of id2ref: ``` "/home/chkbuild/chkbuild/tmp/build/20201017T033002Z/ruby/lib/drb/drb.rb:366:in `_id2ref'" "/home/chkbuild/chkbuild/tmp/build/20201017T033002Z/ruby/lib/drb/drb.rb:366:in `to_obj'" "/home/chkbuild/chkbuild/tmp/build/20201017T033002Z/ruby/lib/drb/drb.rb:1528:in `to_obj'" "/home/chkbuild/chkbuild/tmp/build/20201017T033002Z/ruby/lib/drb/drb.rb:1847:in `to_obj'" "/home/chkbuild/chkbuild/tmp/build/20201017T033002Z/ruby/lib/drb/drb.rb:1136:in `method_missing'" "/home/chkbuild/chkbuild/tmp/build/20201017T033002Z/ruby/test/rinda/test_rinda.rb:652:in `block in do_reply'" ``` https://rubyci.org/logs/rubyci.s3.amazonaws.com/rhel8/ruby-master/log/20201017T033002Z.log.html.gz I believe that this unintentional thread termination has caused intermittent timeout failure of `TestRingServer#test_do_reply`. The root cause of the "recycled object" issue is a bug of `TestRingServer#test_do_reply`. It creates a callback Proc object but does not hold the reference to the object: ``` callback = DRb::DRbObject.new callback ``` The original "callback" object is GC'ed unintentionally. I could consistently reproduce this issue on my machine by adding `GC.stress = true` at the first of `_test_do_reply` method body. This change uses another local variable name, "callback_orig", to keep the original Proc object.
* keep proc on the stack so it does not moveAaron Patterson2020-10-161-2/+6
|
* test/rinda/test_rinda.rb: Add more debugging codeYusuke Endoh2020-10-171-0/+25
| | | | in addition to de5e8d0e3bc3cc39487ffc9d9c15642b6881cd54
* test/rinda/test_rinda.rb: try debugging TestRingServer#test_do_replyYusuke Endoh2020-10-161-1/+8
| | | | | | | | | | | | | | | https://rubyci.org/logs/rubyci.s3.amazonaws.com/rhel8/ruby-master/log/20201016T063003Z.fail.html.gz ``` 1) Error: Rinda::TestRingServer#test_do_reply: Timeout::Error: timeout /home/chkbuild/chkbuild/tmp/build/20201016T063003Z/ruby/test/rinda/test_rinda.rb:837:in `sleep' /home/chkbuild/chkbuild/tmp/build/20201016T063003Z/ruby/test/rinda/test_rinda.rb:837:in `wait_for' /home/chkbuild/chkbuild/tmp/build/20201016T063003Z/ruby/test/rinda/test_rinda.rb:659:in `_test_do_reply' /home/chkbuild/chkbuild/tmp/build/20201016T063003Z/ruby/test/rinda/test_rinda.rb:643:in `block in test_do_reply' /home/chkbuild/chkbuild/tmp/build/20201016T063003Z/ruby/test/rinda/test_rinda.rb:807:in `with_timeout' /home/chkbuild/chkbuild/tmp/build/20201016T063003Z/ruby/test/rinda/test_rinda.rb:643:in `test_do_reply' ```
* test/ruby/test_syntax.rb: avoid "warning: assigned but unused variable"Yusuke Endoh2020-10-161-1/+1
|
* Adjust sp for `if true or ...`/`if false and ...`wanabe2020-10-161-0/+5
|
* Adjust sp for `x = false; y = (return until x unless x)` [Bug #16695]wanabe2020-10-161-0/+9
|
* Check encoding name to replicateNobuyoshi Nakada2020-10-152-3/+9
| | | | https://hackerone.com/reports/954433
* Merge rubygems-3.2.0.rc.2Hiroshi SHIBATA2020-10-155-23/+18
|
* remove uneffective testKoichi Sasada2020-10-141-25/+0
| | | | | RubyVM.stat[:global_method_state] is no longer available so this test doesn't check any more.
* ruby_vm_global_method_state is no longer needed.Koichi Sasada2020-10-141-2/+2
| | | | Now ruby_vm_global_method_state is not used so let's remove it.
* test/ruby/test_fiber.rb: Suppress "assigned but unused variable" warningsYusuke Endoh2020-10-131-4/+2
|
* relax Fiber#transfer's restrictionKoichi Sasada2020-10-121-16/+87
| | | | | | | | | | | | | | | | | | | | | | | | | 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).
* Make the test suite pass on real Android/Termux environmentYusuke Endoh2020-10-123-4/+27
| | | | Attempting to create a hard link raises EACCES