aboutsummaryrefslogtreecommitdiffstats
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
* Use 127.0.0.1 instead of localhost in Addrinfo specseregon2018-08-182-15/+12
| | | | | | | * Solaries doesn't support Addrinfo.getaddrinfo('localhost', 80), but supports Addrinfo.getaddrinfo('127.0.0.1', 80). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Accept TypeError for Socket#getnameinfoeregon2018-08-181-2/+4
| | | | | | | * Happens when VALIDATE_SOCKLEN() actually checks the length such as on FreeBSD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Always set autoclose=false for IO.for_fd fdseregon2018-08-182-1/+3
| | | | | | | * I believe this should be default behavior, see [Feature #2250]. * Now make test-spec MSPECOPT='-R100 spec/ruby/library/socket' works fine. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Re-add socket specseregon2018-08-1810-0/+1451
| | | | | | | | * This reverts commit df9521fd043df1fb862e46f9b1af83223f16eb2d: "Remove failing spec files" * Platform guards follow in the next commits. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r64441eregon2018-08-181-8/+18
| | | | | | | | | | * This reverts commit 647fc1227a4146ecbfeb0d59358abc8d99cd8ae6: "thread_sync.c (rb_mutex_synchronize): only unlock if we own the mutex" * Let's try to preserve the semantics of always being locked inside Mutex#synchronize, even if an exception interrupts ConditionVariable#wait. * As discussed on [Bug #14999]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_sync.c (rb_mutex_synchronize): only unlock if we own the mutexnormal2018-08-181-18/+8
| | | | | | | | | | | | | | | | | If an exception is raised inside Mutex#sleep (via ConditionVariable#wait), we cannot guarantee we can own the mutex in the ensure callback. However, who owns the mutex at that point does not matter. What matters is the Mutex is usable after an exception occurs. * thread_sync.c (rb_mutex_synchronize): only unlock if we own the mutex * spec/ruby/library/conditionvariable/wait_spec.rb: only test lock usability after thread kill. Who owns the lock at any particular moment is an implementation detail which we cannot easily guarantee. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Guard spec failing on Solariseregon2018-08-171-26/+28
| | | | | | * https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20180817T182406Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add guard for Solaris in Socket#connect_nonblock speceregon2018-08-171-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Guard connect_nonblock spec on FreeBSDeregon2018-08-171-18/+20
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Guard with a :pktinfo feature specs relying on PKTINFOeregon2018-08-173-3/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Re-add specseregon2018-08-173-0/+297
| | | | | | | * This reverts commit 325fd389018897bd156837639675517ef3b7dea5. * Platform guards in the next commit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add a note how to run specs under older Ruby versionseregon2018-08-171-0/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix typo in version guarderegon2018-08-171-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add version guards for Enumerator::ArithmeticSequenceeregon2018-08-173-27/+77
| | | | | | * And keep specs for older versions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* spec/README.md: add a note about version guardseregon2018-08-171-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Integrate new specs for ConditionVariable#wait to prevent regressionseregon2018-08-171-0/+96
| | | | | | * See [Bug #14999]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* skip examples failing on solarisnaruse2018-08-164-10/+18
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* apply r64239 to macOS toonobu2018-08-161-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* spec/ruby/optional/capi/ext/io_spec.c: guard unreachable codenobu2018-08-151-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* spec/ruby/optional/capi/ext/io_spec.c: guard unreachable codenobu2018-08-151-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* -Wsuggest-attribute=noreturn on io_spec_rb_io_wait_readablenobu2018-08-151-0/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* spec/ruby/optional/capi/io_spec.rb: fix fragile spec from unpredictable errnonormal2018-08-142-0/+16
| | | | | | | | | | | | | | | rb_io_wait_readable and rb_io_wait_writable depend on the TSD errno value. Due to the recent changes in r64352-r64353 to restructure GVL, errno could be set to EAGAIN from the signal self-pipe and cause the rb_io_wait_readable spec to block unexpectedly. This should fix rubyspec timeouts on Solaris: http://rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20180814T042506Z.fail.html.gz * spec/ruby/optional/capi/ext/io_spec.c: add errno= setter method * spec/ruby/optional/capi/io_spec.rb: set errno to appropriate values for tests git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* non-symbol keys in kwargsnobu2018-08-142-30/+92
| | | | | | | | * class.c (separate_symbol): [EXPERIMENTAL] non-symbol key in keyword arguments hash causes an exception now. c.f. https://twitter.com/yukihiro_matz/status/1022287578995646464 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* skip non-IP interfacesnobu2018-08-121-2/+2
| | | | | | | * spec/ruby/library/socket/socket/getifaddrs_spec.rb: VirtualBox host only adapter seems something different than ordinary interfaces. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix r64296naruse2018-08-111-9/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Solaris 10 doesn't have getifaddrsnaruse2018-08-111-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Solaris raises EAI_SERVICE if hints.ai_socktype=0naruse2018-08-111-9/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove failing specsnaruse2018-08-103-297/+0
| | | | | | https://rubyci.org/logs/rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/log/20180810T183001Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove failing spec filesnaruse2018-08-1010-1451/+0
| | | | | | | | | | | Re-commit after specs are fixed. http://rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/log/20180810T063001Z.log.html.gz http://rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20180809T191808Z.log.html.gz http://rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20180809T192406Z.log.html.gz http://rubyci.s3.amazonaws.com/unstable10s/ruby-trunk/log/20180809T151911Z.log.html.gz http://rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20180809T192507Z.log.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c: fix rubyspec of Process.groupsmrkn2018-08-101-2/+2
| | | | | | | | | | | | | | | getgroups(2) may return a GID list that includes duplicated GIDs. The behavior is totaly depends on what OS is used. This commit fixes the example of Process.groups so that the example is independent of this OS-dependent features. Additonaly, this commit adds the description of such system-dependent characteristics of Process.groups. [ruby-dev:50603] [Bug #14969] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* another test needs IO.selectnobu2018-08-101-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Don't run the spec on Solarisnaruse2018-08-091-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* apply r64239 to macOS toonobu2018-08-091-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* apply r64239 to macOS toonobu2018-08-094-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Don't run specs on Solarisnaruse2018-08-091-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* spec/ruby/library/socket/*: more FreeBSD fixesnormal2018-08-097-5/+33
| | | | | | | | | | | | | | | | | | | | | FreeBSD portability notes: Loopback connections are not instantaneous (unlike Linux), so non-blocking read-after-write MUST check for readability via IO.select or IO#wait_readable before attempting non-blocking recv/read operations. IPv6 seems favored, so we'll get "::" instead of "0.0.0.0" Some constants are different or obsolete, so that should be self-explanatory. There are still other failures I or somebody else needs to get to when we have time and feel like dealing with spec DSL: http://rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/recent.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix MSG_OOB specnaruse2018-08-081-9/+3
| | | | | | | | | * OOBINLINE should be set for accepted socket * When OOBINLINE is set, MSG_OOB shouldn't be passed to recv Merge spec/ruby's commit 5b418374f8006318434ee9a2366382d004f585df git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add colon to avoid chkbuild's alertnaruse2018-08-081-1/+1
| | | | | | | | https://github.com/ruby/chkbuild/blob/c0448670a9a5cb85f283bc639806ba09b294557f/chkbuild/ruby.rb#L847 Merge ruby/spec's commit 5a6ac7dbef3d59fe279303bf3346d92f1e620f12 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Some environments do not have IPv6 address of localhost in /etc/hostskazu2018-08-081-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* skip hanging-up tests on macOSnobu2018-08-084-8/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* spec/ruby/library/socket/*: fix hanging on FreeBSD 11.1normal2018-08-083-2/+6
| | | | | | | | | There are still other test failures which need fixing on FreeBSD. Keep an eye on: http://rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/recent.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* enumerator.c: Introduce Enumerator::ArithmeticSequencemrkn2018-08-063-23/+18
| | | | | | | | | | | | | | | | | | | This commit introduces new core class Enumerator::ArithmeticSequence. Enumerator::ArithmeticSequence is a subclass of Enumerator, and represents a number generator of an arithmetic sequence. After this commit, Numeric#step and Range#step without blocks returned an ArithmeticSequence object instead of an Enumerator. This class introduces the following incompatibilities: - You can create a zero-step ArithmeticSequence, and its size is not ArgumentError, but Infinity. - You can create a negative-step ArithmeticSequence from a range. [ruby-core:82816] [Feature #13904] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* spec/ruby/library/socket/socket/getaddrinfo_spec.rb: avoid nonsensical lookupnormal2018-08-031-2/+2
| | | | | | | | | | | "http" is a TCP service, so /etc/services on typical GNU/Linux systems only specify a TCP port for it. Use "discard" since it seems used for other specs and is specified as both TCP and UDP. This caused many CI failures like the following: git clone https://gist.github.com/812a9b747e4c4cb2e844d4be7991cd2d git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@9be7c7eeregon2018-08-03246-544/+9104
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/mspec@072849eeregon2018-08-035-32/+40
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* encoding.c (rb_enc_get_index): return -1 for non-encoding capable objectseregon2018-08-031-0/+5
| | | | | | | * Clarify logic and add spec. * Now passes test-all with the JSON fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert "encoding.c (rb_enc_get_index): return -1 for non-encoding capable ↵eregon2018-08-031-5/+0
| | | | | | | | | objects" * This reverts commit fb253d2032e51f333e6577aa4fcf0c03f9c6fc02. * The CI is failing, this seems a bug in the JSON C extension. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* encoding.c (rb_enc_get_index): return -1 for non-encoding capable objectseregon2018-08-031-0/+5
| | | | | | * Clarify logic and add spec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* encoding.c (enc_set_index): raise instead of rb_bug() for non-encoding ↵eregon2018-08-031-0/+9
| | | | | | | | capable objects * Add spec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* spec/ruby/security/cve_2018_6914_spec.rb: get rid of leftover filesnormal2018-07-111-9/+12
| | | | | | I ran out of inodes in $TMPDIR :< git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e