summaryrefslogtreecommitdiff
path: root/spec
AgeCommit message (Collapse)Author
2020-11-13Improve error message when subclassing non-ClassJeremy Evans
Fixes [Bug #14726] Notes: Merged: https://github.com/ruby/ruby/pull/3330
2020-11-13Update to ruby/spec@b0b7f53Benoit Daloze
2020-11-13Update to ruby/mspec@f8b0618Benoit Daloze
2020-11-13Fixup 957efa95cc12c608705a5663256226f022ea6c7fHiroshi SHIBATA
2020-11-12spec/ruby/core/file/utime_spec.rb: XFS seems to have Year 2038 problemYusuke Endoh
https://rubyci.org/logs/rubyci.s3.amazonaws.com/rhel8/ruby-master/log/20201112T123004Z.fail.html.gz ``` 1) File.utime allows Time instances in the far future to set mtime and atime (but some filesystems limit it up to 2446-05-10) FAILED Expected [559444, 2446].include? 2038 to be truthy but was false /home/chkbuild/chkbuild/tmp/build/20201112T123004Z/ruby/spec/ruby/core/file/utime_spec.rb:80:in `block (4 levels) in <top (required)>' /home/chkbuild/chkbuild/tmp/build/20201112T123004Z/ruby/spec/ruby/core/file/utime_spec.rb:3:in `<top (required)>' ``` ``` $ touch foo $ ./miniruby -e 'time = Time.at(1<<44); File.utime(time, time, "foo")' $ ls -l foo -rw-r--r--. 1 mame wheel 0 Jan 19 2038 foo ```
2020-11-07Fix indentationKazuki Tsujimoto
2020-11-07Fix and remove spec testing undefined behaviorKazuki Tsujimoto
2020-11-04Revert "Make `marshal_load` public"Marc-Andre Lafortune
This reverts commit ee7cc6ac35cfb056b3946b1dcd6d4d5a140ccacf. I'm not sure I agree with the spec, but I just tweaked it. Notes: Merged: https://github.com/ruby/ruby/pull/3736
2020-11-03Make Array methods return Array instances instead of subclass instancesJeremy Evans
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] Notes: Merged: https://github.com/ruby/ruby/pull/3690 Merged-By: jeremyevans <code@jeremyevans.net>
2020-11-01Use the suppress_warning helper instead of doing it manuallyKazuki Tsujimoto
2020-11-01Suppress "One-line pattern matching is experimental" warningKazuki Tsujimoto
2020-11-01Fix Rubyspec (ruby-2.7) failuresKazuki Tsujimoto
https://github.com/ruby/ruby/runs/1337845174
2020-11-01use one-line pattern matching for warning testsKoichi Sasada
2020-10-26Assoc pattern matching (#3703)Nobuyoshi Nakada
[Feature #17260] One-line pattern matching using tASSOC R-assignment is rejected instead. Notes: Merged-By: nobu <nobu@ruby-lang.org>
2020-10-26Ignore <internal: entries from core library methods for Kernel#warn(message, ↵Benoit Daloze
uplevel: n) * Fixes [Bug #17259] Notes: Merged: https://github.com/ruby/ruby/pull/3647
2020-10-26Add specs that #caller and #caller_locations include core library methods ↵Benoit Daloze
defined in Ruby Notes: Merged: https://github.com/ruby/ruby/pull/3647
2020-10-26Update to ruby/spec@b164536Benoit Daloze
2020-10-26Remove spec which is too difficult to get working with various compilersBenoit Daloze
* The spec means to use an actual system library function, not a wrapper.
2020-10-26Use gcc-specific pragma only on gcc (and the family)Nobuyoshi Nakada
2020-10-25Fix compilation on MSVCNobuyoshi Nakada
* cast scalar value instead of function * use `rb_pid_t` for the portability
2020-10-25Try to fix compilation on MSVCBenoit Daloze
2020-10-24Update to ruby/spec@4f59d86Benoit Daloze
2020-10-24Update to ruby/mspec@b56e7a2Benoit Daloze
2020-10-23numeric.c, range.c: prohibit zero stepKenta Murata
* numeric.c: prohibit zero step in Numeric#step * range.c: prohibit zero step in Range#step * Fix ruby-spec [Feature #15573] Notes: Merged: https://github.com/ruby/ruby/pull/3689 Merged-By: mrkn <mrkn@ruby-lang.org>
2020-10-19Fix typos [ci skip]Kazuhiro NISHIYAMA
2020-10-15Partly reverted test failing with https://github.com/rubygems/rubygems/pull/3921Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3659
2020-10-15Merge bundler-2.2.0.rc.2Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3659
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-02Removed meaningless system dependent testsNobuyoshi Nakada
As [Bug #16662] lchmod available in linux since glibc 2.31.9000, a system call may exist or not exist depending on the version. It is not a spec nor responsibility of Ruby.
2020-10-01spec/ruby/core/process/spawn_spec.rb: skip a test on AndroidYusuke Endoh
On Android, STDERR seems to be open even its invoker closes it. http://rubyci.s3.amazonaws.com/android29-x86_64/ruby-master/log/20201001T014315Z.fail.html.gz ``` 1) Process.spawn closes STDERR in the child if :err => :close FAILED Expected (59840): "out\nrescued\n" but got: "out\n" ```
2020-09-30[ruby/ostruct] Improved YAML serialization.Marc-Andre Lafortune
Patch adapted from Pietro Monteiro [Fixes bug#8382] Notes: Merged: https://github.com/ruby/ruby/pull/3593
2020-09-30Update to ruby/spec@bfd843aBenoit Daloze
2020-09-30Update to ruby/mspec@e154fa1Benoit Daloze
2020-09-30Update to ruby/spec@681e8cfBenoit Daloze
2020-09-30Update to ruby/mspec@4120a62Benoit Daloze
2020-09-30Update to ruby/spec@9277d27Benoit Daloze
2020-09-28Add rb_category_warn{,ing} for warning messages with categoriesJeremy Evans
This adds the following C-API functions that can be used to emit warnings with categories included: ```c void rb_category_warn(const char *, const char*, ...) void rb_category_warning(const char*, const char*, ...) ``` Internally in error.c, there is an rb_warn_category function that will call Warning.warn with the string and the category keyword if it doesn't have an arity of 1, and will call Warning.warn with just the string if it has an arity of 1. This refactors the rb_warn_deprecated{,_to_remove} functions to use rb_warn_category. This makes Kernel#warn accept a category keyword and pass it to Warning.warn, so that Ruby methods can more easily emit warnings with categories. rb_warn_category makes sure that the passed category is a already defined category symbol before calling Warning.warn. The only currently defined warning category is :deprecated, since that is what is already used. More categories can be added in later commits. Notes: Merged: https://github.com/ruby/ruby/pull/3508
2020-09-28Clarify spec description for Hash#{each,each_pair}Benoit Daloze
2020-09-28[rubygems/rubygems] Move comment below shebang in bin/console templateSteven Peckins
In an executable script, the shebang line should be the first line (the file needs to start with the bytes 0x23 0x21). Putting a comment above it will break the script. (Regression test included per @deivid-rodriguez) https://github.com/rubygems/rubygems/commit/962e669feb Notes: Merged: https://github.com/ruby/ruby/pull/3599
2020-09-25freeze all Range objects.v3_0_0_preview1Koichi Sasada
Matz want to try to freeze all Range objects. [Feature #15504] Notes: Merged: https://github.com/ruby/ruby/pull/3583
2020-09-25should not check taint flag on rubyspec.Koichi Sasada
Now taint flag is obsolete and it is used fro shareaable flag. So we should not check this flag. Notes: Merged: https://github.com/ruby/ruby/pull/3575
2020-09-25Disable deprecation warning by the default [Feature #16345]Nobuyoshi Nakada
And `-w` option turns it on. Notes: Merged: https://github.com/ruby/ruby/pull/3481
2020-09-23bump Bundler's version to 2.2.0.rc.1Hiroshi SHIBATA
2020-09-22Revert "Prevent SystemStackError when calling super in module with activated ↵Jeremy Evans
refinement" This reverts commit eeef16e190cdabc2ba474622720f8e3df7bac43b. This also reverts the spec change. Preventing the SystemStackError would be nice, but there is valid code that the fix breaks, and it is probably more common than cases that cause the SystemStackError. Fixes [Bug #17182] Notes: Merged: https://github.com/ruby/ruby/pull/3564
2020-09-21Make Thread#join always convert its argument, as before 70f08f1eedBenoit Daloze
2020-09-21Fix Thread leak in Thread#join specsBenoit Daloze
2020-09-21Make `Thread#join` non-blocking.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3558
2020-09-17Fix typos [ci skip]Kazuhiro NISHIYAMA
s/overriden/overridden/