aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* test/drb/drbtest.rb: Skip test_06_timeout on Solaris10sYusuke Endoh2019-09-021-6/+9
| | | | | | | | | | The test seems to have a race condition, which fails on very slow machine like Solaris10s. So skip it. In addition, this change restores timeout guard that was removed at 0660d7cb538cf5284d50f66adfcbd78609839715. This is because the test gets stuck forever when something wrong occurs. It is better to fail the test than stuck.
* Do not clear backtrace in Exception#exceptionNobuyoshi Nakada2019-09-021-0/+12
| | | | [Bug #15558]
* Rewrote using assert_separatelyNobuyoshi Nakada2019-09-021-16/+8
|
* Prohibit nul-separated glob pattern [Feature #14643] (#2419)Nobuyoshi Nakada2019-09-021-3/+2
|
* Add Net::FTP#features and Net::FTP#optionShugo Maeda2019-09-021-0/+96
| | | | | Patch by darkphnx (Dan Wentworth) . Thanks! [Feature #15964]
* Revert "Make Enumerator::Lazy#with_index be lazy"Jeremy Evans2019-09-011-22/+0
| | | | | | This reverts commit 83498854eb5a824f1f83c31fac18c9279f9ee10d. This didn't pass rubyspec.
* Fix opt_regexpmatch1 referencesTakashi Kokubun2019-09-021-4/+1
|
* Make Enumerator::Lazy#with_index be lazyJeremy Evans2019-09-011-0/+22
| | | | | | | | | | Previously, Enumerator::Lazy#with_index was not defined, so it picked up the default implementation from Enumerator, which was not lazy. Based on earlier patch from nobu. Fixes [Bug #7877]
* Skip POINTOPOINT of IPv4 too instead of IPv6 onlyKazuhiro NISHIYAMA2019-09-021-5/+4
| | | | | | | | | Fix following error on `utun*`: ``` 1) Error: TestSocket#test_udp_server: Errno::ECONNREFUSED: Connection refused - recvmsg(2) ```
* Fix method name in test to not override existing method nameJeremy Evans2019-09-011-1/+1
|
* Fix keyword argument separation warning in method_missingJeremy Evans2019-09-011-0/+73
| | | | | | vm_call_method_missing was dropping VM_CALL_KW_SPLAT, so this just makes it not drop it, to get the same behavior as calling the method directly.
* test/drb/drbtest.rb: Use EnvUtil.timeout for timeout scale factorYusuke Endoh2019-09-011-1/+1
|
* Revert "Revert "Revert "Skip BUGs on Solaris"""Yusuke Endoh2019-09-012-3/+1
| | | | | | | This reverts commit 3be3948870f6589343c4aecb541e22fae7751b47. The Solaris environment couldn't lookup the hostname itself by a wrong setting. Now it is fixed, so try again.
* Revert "Revert "Skip BUGs on Solaris""Yusuke Endoh2019-09-012-1/+3
| | | | | | | This reverts commit 84dca8eff0cbcb1c23623b47fb78b0daf5c76e35. "exceution expired" occurred on Solaris. https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris11s-sunc/ruby-master/log/20190901T072504Z.fail.html.gz
* Make pattern matching support **nil syntaxKazuki Tsujimoto2019-09-011-0/+38
|
* Automatically detect missing symbolsTakashi Kokubun2019-09-011-0/+1
| | | | | | | | which are usually optimized away by -O3. This CI can detect missing exports like ea84a680755b5a7fa700618cbe78e3b2fc7be01d which was needed for 761346a9604ca2c79777d1d67fb5dcc3c30dbf69.
* test/ruby/test_keyword.rb: Add remove_method before method redefinitionYusuke Endoh2019-09-011-0/+10
| | | | to suppress redefinition warnings.
* Revert "Skip BUGs on Solaris"Yusuke Endoh2019-09-012-3/+1
| | | | | | | This reverts commit 8adefd4cf29288f6e43f20efbdd44b215ae16c7a. I couldn't see any failure on Solaris if the guard is removed. Give it a try.
* Fix keyword argument separation warning when using sendJeremy Evans2019-08-311-0/+68
| | | | | | vm_call_opt_send was dropping VM_CALL_KW_SPLAT, so this just makes it not drop it, to get the same behavior as calling the method directly.
* Don't pass an empty keyword hash when double splatting empty hash when ↵Jeremy Evans2019-08-311-0/+138
| | | | | | | | calling cfunc This mirrors earlier changes in keyword argument separation for calling Ruby methods and calling procs/lambdas, so that behavior is kept the same.
* Split warning messages for tag-jumpNobuyoshi Nakada2019-09-012-21/+21
|
* Don't pass an empty keyword hash when double splatting empty hashJeremy Evans2019-08-301-0/+49
|
* Use more accurate source location in keyword argument separation warningsJeremy Evans2019-08-301-4/+4
| | | | | | | | This shows locations in places it didn't before, such as for proc calls, and fixes the location for super calls. This requires making iseq_location non-static and MJIT exported, which I hope will not cause problems.
* Warn for keyword to last hash parameter when method has no optional/rest ↵Jeremy Evans2019-08-301-2/+23
| | | | | | | | | parameters Previously, there was no warning in this case, even though we will be changing the behavior in Ruby 3. Fixes [Bug #14130]
* Remove a verbose warning that is no longer neededJeremy Evans2019-08-301-3/+3
| | | | This warns about a case that we will continue to support.
* Fix remaining warning issues in the tests due to keyword argument separationJeremy Evans2019-08-304-23/+47
|
* Make Method/Proc#parameters handle **nil syntaxJeremy Evans2019-08-301-0/+6
| | | | Use a [:nokey] entry in this case.
* Make RubyVM::AbstractSyntaxTree handle **nil syntaxJeremy Evans2019-08-301-0/+13
| | | | | Use false instead of nil for the keyword and keyword rest values in that case.
* Make ripper support **nil syntaxJeremy Evans2019-08-301-0/+10
| | | | | | | | | The on_params hook will use :nil as the keyword rest argument. There is a new on_nokw_param hook as well. This fixes a type issue in the previous code, where an ID was passed where a VALUE was the declared type. The symbol :nil is passed instead of the id.
* Support **nil syntax for specifying a method does not accept keyword argumentsJeremy Evans2019-08-302-0/+44
| | | | | | | | | This syntax means the method should be treated as a method that uses keyword arguments, but no specific keyword arguments are supported, and therefore calling the method with keyword arguments will raise an ArgumentError. It is still allowed to double splat an empty hash when calling the method, as that does not pass any keyword arguments.
* Restore splitting of hashes into positional and keyword arguments, add warningJeremy Evans2019-08-301-0/+24
| | | | | | | | | | | | | | This restores compatibility with Ruby 2.6, splitting the last positional hash into positional and keyword arguments if it contains both symbol and non-symbol keys. However, in this case it will warn, as the behavior in Ruby 3 will be to not split the hash and keep it as a positional argument. This does not affect the handling of mixed symbol and non-symbol keys in bare keywords. Those are still treated as keywords now, as they were before this patch. This results in different behavior than Ruby 2.6, which would split the bare keywords and use the non-Symbol keys as a positional arguments.
* Fix test after keyword argument separationJeremy Evans2019-08-301-1/+1
| | | | | | | | | Now that keyword splats accept non-Symbols, the type of exception changes. Previously, a TypeError (hash key "k1" is not a Symbol) was raised for this test, but now an ArgumentError (unknown keyword: "k1") is raised.
* Update tests to fix warning message changesJeremy Evans2019-08-301-4/+4
| | | | | Now that keyword splats accept non-Symbols, the inspect value of the keyword is used instead of the string value.
* Fix keyword argument separation warnings in testJeremy Evans2019-08-309-31/+31
|
* Make the dot-colon method reference frozenMaciej Mensfeld2019-08-301-0/+13
| | | | | [Feature #16103] Close: https://github.com/ruby/ruby/pull/2267
* proc.c: Add UnboundMethod#bind_callYusuke Endoh2019-08-301-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | `umethod.bind_call(obj, ...)` is semantically equivalent to `umethod.bind(obj).call(...)`. This idiom is used in some libraries to call a method that is overridden. The added method does the same without allocation of intermediate Method object. [Feature #15955] ``` class Foo def add_1(x) x + 1 end end class Bar < Foo def add_1(x) # override x + 2 end end obj = Bar.new p obj.add_1(1) #=> 3 p Foo.instance_method(:add_1).bind(obj).call(1) #=> 2 p Foo.instance_method(:add_1).bind_call(obj, 1) #=> 2 ```
* Move pread + pwrite tests out of RUBY_ENGINE blockCharles Oliver Nutter2019-08-301-20/+20
| | | These tests were guarded by a RUBY_ENGINE of "ruby" even though they test an official Ruby feature (pread/pwrite added in Ruby 2.5). This commit moves them to the top level of the test case so they will run on other implementations.
* Disallow use of attrset symbols as Struct membersJeremy Evans2019-08-291-0/+4
| | | | Fixes [Bug #11326]
* Refined warnings against literal in flip-flopNobuyoshi Nakada2019-08-291-3/+21
|
* Allow non-finalizable objects in ObjectSpace::WeakMapJean Boussier2019-08-291-10/+21
| | | | | | | | | | [feature #16035] This goes one step farther than what nobu did in [feature #13498] With this patch, special objects such as static symbols, integers, etc can be used as either key or values inside WeakMap. They simply don't have a finalizer defined on them. This is useful if you need to deduplicate value objects
* Freeze method reference operator objectNobuyoshi Nakada2019-08-291-0/+4
| | | | [Feature #16103]
* Revert "Add pipeline operator [Feature #15799]"Nobuyoshi Nakada2019-08-292-11/+0
| | | | | | | | | | | | | This reverts commits: * d365fd5a024254d7c105a62a015a7ea29ccf3e5d * d780c3662484d6072b3a6945b840049de72c2096 * aa7211836b769231a2a8ef6b6ec2fd0ec882ef29 * 043f010c28e82ea38978bf8ed885416f133b5b75 * bb4dd7c6af05c7821d572e2592ea3d0cc748d81f * 043f010c28e82ea38978bf8ed885416f133b5b75 * f169043d81524b5b529f2c1e9c35437ba5bc3a7a http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/94645
* Show the previous definition location,Nobuyoshi Nakada2019-08-292-8/+12
| | | | | when reopened class/module redefinition mismatched the previous definition. [Feature #11460]
* Aseert exception at negative step for non-endless range tooNobuyoshi Nakada2019-08-291-0/+1
|
* Revert "Remove warnings of flip-flop deprecation from tests and specs"Nobuyoshi Nakada2019-08-292-15/+2
| | | | | | | | This reverts commit bf7a32d22079cc44eb19794e41d82b886d5d17b3. flip-flop is no longer deprecated. [Feature #5400]
* Fix use_lib_reline for test/readlineaycabta2019-08-271-1/+4
|
* Add test with encoding.manga_osyo2019-08-271-10/+10
|
* Change to test file path.manga_osyo2019-08-271-0/+0
|
* Add support Windows in CI.manga_osyo2019-08-271-8/+8
|
* Add test reline.manga_osyo2019-08-271-0/+242
|