aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core
Commit message (Collapse)AuthorAgeFilesLines
* Update to ruby/spec@9a501a8Benoit Daloze2019-05-2817-614/+204
|
* Add FrozenError#receiverJeremy Evans2019-05-261-0/+34
| | | | | | | | | | | | | | | | | Similar to NameError#receiver, this returns the object on which the modification was attempted. This is useful as it can pinpoint exactly what is frozen. In many cases when a FrozenError is raised, you cannot determine from the context which object is frozen that you attempted to modify. Users of the current rb_error_frozen C function will have to switch to using rb_error_frozen_object or the new rb_frozen_error_raise in order to set the receiver of the FrozenError. To allow the receiver to be set from Ruby, support an optional second argument to FrozenError#initialize. Implements [Feature #15751]
* Add notes for the Process#clock_getres specBenoit Daloze2019-05-241-1/+4
|
* Only exclude the failing clocks for Process.clock_getres specs on AIXBenoit Daloze2019-05-242-1/+8
| | | | * https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20190522T103301Z.fail.html.gz
* Skip the Process.clock_getres spec on AIXYusuke Endoh2019-05-241-1/+1
| | | | https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20190522T103301Z.fail.html.gz
* Add `Time#ceil`.manga_osyo2019-05-231-0/+45
| | | | Closes: https://github.com/ruby/ruby/pull/2133
* Adding Enumerable#filter_mapAlfonso Jiménez2019-05-231-0/+26
| | | | | [Feature #15323] Closes: https://github.com/ruby/ruby/pull/2017
* spec/ruby/core/hash/constructor_spec.rb: add "ruby_version_is" guardYusuke Endoh2019-05-231-7/+20
| | | | follow up for d3f1c615c5
* hash.c (rb_hash_s_create): Reject `Hash[[nil]]`Yusuke Endoh2019-05-231-2/+2
| | | | | | | The behavior of `Hash[[nil]] #=> {}` was a bug until 1.9.3, but had been remained with a warning because some programs depended upon it. Now, six years passed. We can remove the compatibility behavior. [Bug #7300]
* Eagerly name modules and classesAlan Wu2019-05-221-0/+36
| | | | | | | | | | | | | | | | | | | | | | | * variable.c: make the hidden ivars `classpath` and `tmp_classpath` the source of truth for module and constant names. Assign to them when modules are bind to constants. * variable.c: remove references to module name cache, as what used to be the cache is now the source of truth. Remove rb_class_path_no_cache(). * variable.c: remove the hidden ivar `classid`. This existed for the purposes of module name search, which is now replaced. Also, remove the associated rb_name_class(). * class.c: use rb_set_class_path_string to set the name of Object during boot. Must use a fstring as this runs before rb_cString is initialized and creating a normal string leads to a VALUE without a class. * spec/ruby/core/module/name_spec.rb: add a few specs to specify what happens to Module#name across multiple operations. These specs pass without other code changes in this commit. [Feature #15765]
* Remove redundant ignore rule for Process#clock_getres specsBenoit Daloze2019-05-201-7/+0
|
* Move exclusion for Hyper-V next to other skipped constantsBenoit Daloze2019-05-202-6/+9
|
* skip a test for CLOCK_MONOTONIC_RAW.Koichi Sasada2019-05-201-1/+6
| | | | | | | | | | | | | On my Linux guest machine on Hyper-V, I got an error. Process.clock_gettime(CLOCK_MONOTONIC_RAW, :nanosecond) returns like: ... 875573945119100 875573945119600 ... even if `Process.clock_getres(value, :nanosecond)` returns 1. So I simply skip this test for CLOCK_MONOTONIC_RAW.
* Use ruby_bug guardNobuyoshi Nakada2019-05-081-1/+1
|
* Do not break rubyspec for old RubyTakashi Kokubun2019-05-081-1/+3
| | | | Fixing 7d805e67f3275aef066d77aa9c32bef715c362ed
* Avoid triggering autoload in Module#const_defined?(String)Jean Boussier2019-05-071-0/+1
| | | | [Bug #15780]
* Skip the spec on Windows because RUBY_EXE is RUNRUBY and it calls ruby as ↵NAKAMURA Usaku2019-04-301-2/+4
| | | | grandchild
* CLOCK_MONOTONIC_RAW_APPROX seems less precise than advertised on macOSBenoit Daloze2019-04-281-1/+1
| | | | * https://travis-ci.org/ruby/ruby/builds/525651487
* Update to ruby/spec@7de852dBenoit Daloze2019-04-28122-4301/+3891
|
* Move the check for CentOS CLOCK_MONOTONIC_RAW next to othersBenoit Daloze2019-04-282-18/+21
| | | | | * Fixes "No behavior expectation was found in the example" * https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos6/ruby-trunk/log/20190428T093004Z.fail.html.gz
* Skip CLOCK_UPTIME_RAW_APPROX since it seems less precise than advertised on ↵Benoit Daloze2019-04-282-1/+8
| | | | | | macOS * See https://travis-ci.org/ruby/ruby/jobs/525595997
* Exclude failing Process.clock_getres specs on AIXBenoit Daloze2019-04-281-3/+5
|
* Add missing platform guardBenoit Daloze2019-04-281-3/+5
|
* Skip problematic Process.clock_getres specs on ARMBenoit Daloze2019-04-282-5/+19
| | | | | * https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-trunk/log/20190428T051708Z.fail.html.gz * https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-ad7f67/ruby-trunk/log/20190428T045405Z.fail.html.gz
* Workaround a CentOS bug in Process.clock_getres specsBenoit Daloze2019-04-281-14/+18
|
* Refactor logic in Process.clock_gettime specBenoit Daloze2019-04-281-5/+3
|
* Fix typo in specBenoit Daloze2019-04-281-1/+1
|
* Skip the entire Process.clock_getres spec on FreeBSDBenoit Daloze2019-04-281-18/+18
| | | | | * Clocks don't match the reported precision. * https://rubyci.org/logs/rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/log/20190428T093003Z.fail.html.gz
* Some Solaris versions seem to only provide millisecond accuracy for ↵Benoit Daloze2019-04-271-2/+4
| | | | | | CLOCK_REALTIME * https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20190427T182404Z.fail.html.gz
* Skip clock_getres spec on BSDBenoit Daloze2019-04-271-3/+5
| | | | | * clock_getres() seems to be incorrect on BSD: https://rubyci.org/logs/rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/log/20190427T183003Z.fail.html.gz
* Try to more accurately reflect MRI's logic in specs for finding the home if ↵Benoit Daloze2019-04-271-1/+10
| | | | $HOME is unset
* Update to ruby/spec@14e6148Benoit Daloze2019-04-271-7/+10
|
* Update to ruby/spec@15c9619Benoit Daloze2019-04-27112-2237/+1884
|
* Use an exclusive range for ruby_version_isNobuyoshi Nakada2019-04-231-1/+1
|
* Fix RUBY_REVISION specTakashi Kokubun2019-04-221-2/+10
| | | | broken by 5da52d1210625fb00acd573b3f32281b4bde1730
* Add `Time#floor`nobu2019-04-201-0/+37
| | | | | | | | | [Feature #15653] [Fix GH-2092] From: manga_osyo <manga.osyo@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: warn non-nil $,nobu2019-04-183-7/+15
| | | | | | | | * array.c (rb_ary_join_m): warn use of non-nil $,. * io.c (rb_output_fs_setter): warn when set to non-nil value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Suppress warningsnobu2019-04-181-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Proc.new: change deprecation warning for clarity (issue #15539)marcandre2019-04-132-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Introduce beginless range [Feature#14799]mame2019-04-031-3/+19
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix Float#to_s specs to not depend on the platform representation of doubleseregon2019-04-011-127/+124
| | | | | | * AIX, Solaris, etc have a different binary representation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@e81b3cderegon2019-03-2818-57/+465
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix typoskazu2019-03-271-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Skip EBADF spec in MJIT test for nowk0kubun2019-03-271-11/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* spec/../shared/write.rb: suppress random failurek0kubun2019-02-231-3/+5
| | | | | | due to MJIT worker's known race condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* File#birthtime depends on the kernel version on Linuxnobu2019-02-221-1/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@7a16e01eregon2019-02-2151-125/+482
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revise the example on OpenBSDnobu2019-02-201-6/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix rubyspec test to pass tests. please revisit it @nobu?ko12019-02-201-5/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * spec/ruby: Tweak Enuemrator::Chain#rewind spec so that arity of block ↵marcandre2019-02-201-2/+2
| | | | | | | | | matches what is yielded Calling `and_yield(*args)` adds an implicit expectation that all the `args` are passed to a block that can accept them, even though blocks that are not lambda-like don't mind extra arguments. It so happens that this spec passed on Ruby 2.6.1 See [Bug #15613] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e