Граф коммитов

1241 Коммитов

Автор SHA1 Сообщение Дата
Jeremy Evans 179384a668 Revert "Prevent SystemStackError when calling super in module with activated refinement"
This reverts commit eeef16e190.

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]
2020-09-22 12:04:48 -07:00
Benoit Daloze 82998918ef Make Thread#join always convert its argument, as before 70f08f1eed 2020-09-21 16:22:04 +02:00
Benoit Daloze c19bcf38eb Fix Thread leak in Thread#join specs 2020-09-21 15:54:39 +02:00
Samuel Williams 70f08f1eed Make `Thread#join` non-blocking. 2020-09-21 11:48:44 +12:00
Kazuhiro NISHIYAMA e4dbb91f4c
Fix typos [ci skip]
s/overriden/overridden/
2020-09-17 20:34:59 +09:00
Benoit Daloze 3f6c0a6d74 Update to ruby/spec@e829fb0 2020-09-17 11:42:26 +02:00
Chris Seaton 8e173d8b27 Warn on a finalizer that captures the object to be finalized
Also improve specs and documentation for finalizers and more clearly
recommend a safe code pattern to use them.
2020-09-16 13:52:24 -07:00
Benoit Daloze 1af0319fc8 2.8 -> 3.0 in specs 2020-09-15 21:56:00 +02:00
Benoit Daloze 9b535f3ff7 Interpolated strings are no longer frozen with frozen-string-literal: true
* Remove freezestring instruction since this was the only usage for it.
* [Feature #17104]
2020-09-15 21:32:35 +02:00
Marc-Andre Lafortune 60f5d38482 [ruby/ostruct] Fix dup/clone 2020-09-14 16:10:37 -04:00
Marc-Andre Lafortune 125605abd9 [ruby/ostruct] method_missing is private 2020-09-14 16:10:37 -04:00
Benoit Daloze 178c1b0922 Make Mutex per-Fiber instead of per-Thread
* Enables Mutex to be used as synchronization between multiple Fibers
  of the same Thread.
* With a Fiber scheduler we can yield to another Fiber on contended
  Mutex#lock instead of blocking the entire thread.
* This also makes the behavior of Mutex consistent across CRuby, JRuby and TruffleRuby.
* [Feature #16792]
2020-09-14 16:44:09 +12:00
Hiroshi SHIBATA b194973dcd
Revert the related commits about `Tempfile.open` change.
Start with fa21985a7a
  to d7492a0be8
2020-09-09 21:10:48 +09:00
Marc-Andre Lafortune 5e16857315 Fix constant names set using const_set on a singleton class
Fixes [Bug #14895]
2020-09-02 00:05:14 -04:00
Nobuyoshi Nakada 2e80c8347e
Deprecate iterator? method
[Feature #15547] [Fix GH-2071]
2020-08-31 22:14:14 +09:00
卜部昌平 b674fc9ca2
Thread.exclusive: delete
Has been deprecated since 2069c9e031.

[Feature #17125][ruby-core:99636]
2020-08-31 18:08:57 +09:00
Benoit Daloze ff323b2a5c Adapt specs for the new Tempfile.open with block behavior 2020-08-29 12:11:07 +02:00
Benoit Daloze 1199f1a4aa Fix warnings related to new Socket.gethostby* deprecations 2020-08-29 11:58:56 +02:00
Benoit Daloze b49307c701 Update to ruby/spec@335eb9b 2020-08-28 20:26:02 +02:00
Benoit Daloze 3dd63108b0 Update to ruby/mspec@53a6e3e 2020-08-28 20:26:00 +02:00
Nobuyoshi Nakada 7e1fddba4a
States Time.at expects rational-like argument to respond to #to_int
https://bugs.ruby-lang.org/issues/17131
2020-08-28 19:47:29 +09:00
卜部昌平 cc2caa6edf do not test --version
`llvm-strip-7` is a sane valid strip command that LLVM 7 ships, albeit
it does not understand `--version`.  It is a bad idea to check that
option.  Instead just see if the command actually strips something.  A
copy of `/bin/sh` should suffice.  That file must be ubiquitous.
2020-08-22 00:33:37 +09:00
Nguyễn Quang Minh 1819652578
[Feature #16513] TracePoint#inspect returns "... file:line" (#3391)
* Fix debug documents to match Thread#to_s change (Feature #16412 ticket)

* TracePoint#inspect returns "... file:line" (Feature #16513)

* Guard older version of Ruby in Tracepoint inspection tests

* Focus on current thread only when running TracePoint inspection test
2020-08-06 11:56:24 +09:00
David Rodríguez 07dc9691a8 [rubygems/rubygems] https functionality was merged into `net/https`
https://github.com/rubygems/rubygems/commit/d81ce9e457
2020-07-31 21:07:19 +09:00
Benoit Daloze 241244739f Fix arity of Hash#to_proc [Bug #12671] 2020-07-29 18:09:53 +02:00
Kazuhiro NISHIYAMA 946cd6c534
Use https instead of http 2020-07-28 19:51:54 +09:00
Nobuyoshi Nakada f44114b502
Do not assume all compilers accept same flags as gcc 2020-07-28 16:43:38 +09:00
Benoit Daloze 126fd5f15c Update to ruby/spec@07164da 2020-07-27 21:41:08 +02:00
Benoit Daloze 7429841ab6 Update to ruby/mspec@9cffee9 2020-07-27 21:41:03 +02:00
Jeremy Evans d47e124857 Switch reserved for numbered parameter warning to SyntaxError 2020-07-22 08:34:51 -07:00
Nobuyoshi Nakada 840115bf46 Make StringIO encoding fixed
Get rid of affects by default external encoding.
2020-07-20 14:59:19 +09:00
David Rodríguez 5783d0dbfc Import remaining changes
The "sync with commits" scripts failed to properly import these for some
reason.
2020-07-15 16:05:12 +09:00
Utkarsh Gupta fd709382b6 [rubygems/rubygems] Tag the specs with :readline
The newly added specs needs to be tagged as
:readline, otherwise they fail on Windows with
the backtrace: `ZeroDivisionError: divided by 0`.

Such issues are already being skipped on Windows.

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

https://github.com/rubygems/rubygems/commit/391f860af4
2020-07-15 16:05:12 +09:00
Utkarsh Gupta c44c7019b5 [rubygems/rubygems] Add tests with different flag combinations
Since this PR was made because we missed checking
RuboCop offenses with different flags, therefore
adding tests so that all flag combinations are
tested.

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

https://github.com/rubygems/rubygems/commit/d08250efc2
2020-07-15 16:05:12 +09:00
David Rodríguez 4f9c673cab [rubygems/rubygems] Allow setting a tag prefix to be used by gem release tasks
https://github.com/rubygems/rubygems/commit/679008f23a
2020-07-15 16:05:12 +09:00
Utkarsh Gupta ca133c0366 [rubygems/rubygems] Fix line spacing to make Layout/EmptyLines happy
The Gemfile wasn't properly put in the last commit.
As a result, Layout/EmptyLines inspected an offense
in the Gemfile.

This also fixes the spec w.r.t change in the task
default.

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

https://github.com/rubygems/rubygems/commit/d1418fddd3
2020-07-15 16:05:12 +09:00
David Rodríguez 2fafc08aa3 [rubygems/rubygems] Remove unneeded trailing conditions on exitstatus
https://github.com/rubygems/rubygems/commit/27e0e4ecb6
2020-07-15 16:05:12 +09:00
David Rodríguez 547ba6608e [rubygems/rubygems] Easier way to find path to ruby binary
https://github.com/rubygems/rubygems/commit/cdc201f5c4
2020-07-15 16:05:12 +09:00
David Rodríguez 16823d4a05 [rubygems/rubygems] Remove unnecessary assertions on exitstatus
Since our helpers now raise by default if the subcommand fails, these
will never actually fail and are not necessary.

https://github.com/rubygems/rubygems/commit/6153b9321e
2020-07-15 16:05:12 +09:00
David Rodríguez 17b92d221f [rubygems/rubygems] No need to update remotes
Everything is already fetched locally.

https://github.com/rubygems/rubygems/commit/9c304639b1
2020-07-15 16:05:12 +09:00
David Rodríguez d189d31ce9 [rubygems/rubygems] Git clone already takes care of this
https://github.com/rubygems/rubygems/commit/6e0c28d3ab
2020-07-15 16:05:12 +09:00
David Rodríguez a73ea2126f [rubygems/rubygems] Clone rubygems from the local repo
It simplifies things and should avoid issues like the one we had where
the master branch had a bad `.gitattributes` file and changing it on a
PR would be disregarded.

In order for this to work, we need to make sure to fetch all tags from
the repository, so that they can properly be checked out later. This
does not apply to the case of testing against `RGV=..`, since no extra
cloning is needed there.

https://github.com/rubygems/rubygems/commit/d088d936b8
2020-07-15 16:05:12 +09:00
Utkarsh Gupta 5ebca6d709 [rubygems/rubygems] Skip this spec on ruby_core workflow
ruby_core has an 'ast.rb' file that gets in the
middle and breaks this spec, so it's better we skip
this test on this workflow for now.

Also, slightly change the spec name from "run" to
"runs" and change the last assertion, it's cleaner
to check empty error.
Thanks to David Rodríguez for this!

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

https://github.com/rubygems/rubygems/commit/ba8eaa70c3
2020-07-15 16:05:12 +09:00
Utkarsh Gupta d0810fdee4 [rubygems/rubygems] Use latest version of rubocop for RUBY_VERSION > 2.4
With older versions of rubocop, the dependency on
`jaro_winkler` seems to be a pain.
However, in the later versions of rubocop, this
dependency was dropped. So we only need to use
the older version for ruby2.3.

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

https://github.com/rubygems/rubygems/commit/9cd87eaee3
2020-07-15 16:05:12 +09:00
Utkarsh Gupta 077dcacb08 [rubygems/rubygems] Use `--config .rubocop.yml` instead
because rubocop configuration inheritance is
messed up and when using `--ignore-parent-exclusion`,
even though the exit status is 0, the example
still fails because of the configuration issue.

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

https://github.com/rubygems/rubygems/commit/3e20b2738c
2020-07-15 16:05:12 +09:00
Utkarsh Gupta ecb87b55d8 [rubygems/rubygems] Lock rubocop version to 0.80.1
The later RuboCop versions don't work with ruby2.3
so we should lock the version to what works with
ruby2.3 as we haven't dropped the support yet.

And since we're using the older version of rubocop,
also fix `Max` value of `LineLength` to 120, which
is the current standard. Without this, rubocop
will throw the line length offenses.

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

https://github.com/rubygems/rubygems/commit/46d0a800a2
2020-07-15 16:05:12 +09:00
Utkarsh Gupta 215f7c3165 [rubygems/rubygems] Fix linting and make Style/RedundantInterpolation happy
Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

https://github.com/rubygems/rubygems/commit/83e330fa87
2020-07-15 16:05:12 +09:00
Utkarsh Gupta 4875a96edd [rubygems/rubygems] Fix test to run rubocop on the generated gem
With this, it will be ensured that the generated
(skeleton) gem will have no offenses.

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

https://github.com/rubygems/rubygems/commit/47411262e0
2020-07-15 16:05:12 +09:00
Utkarsh Gupta b28c6d04d0 [rubygems/rubygems] Make Style/HashSyntax cop happy
Previously, we were using the old syntax like:
`task :default => :spec`, but now this commit
uses the new Ruby 1.9 hash syntax.

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

https://github.com/rubygems/rubygems/commit/b41d0fdb56
2020-07-15 16:05:12 +09:00
Utkarsh Gupta 449d24200b [rubygems/rubygems] WIP: add test to run rubocop on the generated gem
Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

https://github.com/rubygems/rubygems/commit/730b770f8a
2020-07-15 16:05:12 +09:00