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

853 Коммитов

Автор SHA1 Сообщение Дата
Jean Boussier 9d0866c7d7 [EXPERIMENTAL] Make Module#name return a frozen String
* Always the same frozen String for a given Module or Class.
    * Avoids extra allocations whenever calling Module#name.
    * See [Feature #16150]
2019-09-26 13:25:23 +02:00
Benoit Daloze 6ffc045a81 [EXPERIMENTAL] Make Symbol#to_s return a frozen String
* Always the same frozen String for a given Symbol.
* Avoids extra allocations whenever calling Symbol#to_s.
* See [Feature #16150]
2019-09-26 10:23:02 +02:00
Jeremy Evans 27144de2bd Fix documentation for ENV.each to return ENV
Also have spec check that it returns ENV.

Mostly from burdettelamar@yahoo.com (Burdette Lamar).

Fixes [Bug #16164]
2019-09-20 12:18:07 -07:00
Hiroshi SHIBATA 67a6662032
Removed Scanf from the ruby repository. 2019-09-20 12:43:11 +09:00
Hiroshi SHIBATA a3b8501614
Removed CMath from the ruby repository. 2019-09-20 12:31:37 +09:00
Nobuyoshi Nakada e6378cdcd8
Allow calling a private accessor with `self.`
[Feature #11297] [Feature #16123]
2019-09-20 02:21:37 +09:00
Nobuyoshi Nakada d583df5259
Added version guard
[Feature #11297] [Feature #16123]
2019-09-20 02:21:25 +09:00
Dylan Thacker-Smith 7fbd2f7cc2
Allow calling a private method with `self.`
This makes it consistent with calling private attribute assignment
methods, which currently is allowed (e.g. `self.value =`).

Calling a private method in this way can be useful when trying to
assign the return value to a local variable with the same name.

[Feature #11297] [Feature #16123]
2019-09-20 02:20:59 +09:00
Hiroshi SHIBATA 7d354175d7
Fixed up ccbfb054b1 2019-09-18 18:26:33 +09:00
Hiroshi SHIBATA 2da8574930
Fixed the rubocop warnings 2019-09-18 18:26:33 +09:00
David Rodríguez effacde2c0
[bundler/bundler] Merge all `bundle check --path` specs
And skip them all for bundler 3.

https://github.com/bundler/bundler/commit/b88936cdc2
2019-09-18 18:26:33 +09:00
Bundlerbot 434af7303c
[bundler/bundler] Merge #7340
7340: Fix bundle clean issue r=deivid-rodriguez a=deivid-rodriguez

### What was the end-user problem that led to this PR?

The problem was that `bundle clean` is crashing under some conditions.

### What was your diagnosis of the problem?

My diagnosis was that sometimes (when the bundle includes git sourced gems with extensions), it assumes that some paths exist, but they don't.

### What is your fix for the problem, implemented in this PR?

My fix is to ignore those paths.

### Why did you choose this fix out of the possible options?

I chose this fix because it fixes the issue.

Fixes #7338.

Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
(cherry picked from commit b007fde67c77c1f15f13b97eda186644c2a2be04)

https://github.com/bundler/bundler/commit/3766053507
2019-09-18 18:26:33 +09:00
David Rodríguez e6ad9452b6
[bundler/bundler] Fix remembered flag deprecation message
It was suggested a deprecated command as a fix.

https://github.com/bundler/bundler/commit/e330a9a34f
2019-09-18 18:26:33 +09:00
Samuel Giddins 4f2f6aeb5f
[bundler/bundler] Add a spec for installing git deps after packaging w/o git
https://github.com/bundler/bundler/commit/65351c58b8
2019-09-18 18:26:32 +09:00
David Rodríguez 0c6529bac2
[bundler/bundler] Revert "Add all platforms to lockfile by default"
This reverts commit 3dc509e645abb497e4dc92a7c42be471ff87db0b.

https://github.com/bundler/bundler/commit/b5766564fb
2019-09-18 18:26:32 +09:00
David Rodríguez 6f16ededdd
[bundler/bundler] Revert "Remove now meaningless warning"
This reverts commit 00b095b98fe4bd44950beaf3bc9f1d91eac7b69e.

https://github.com/bundler/bundler/commit/e93bce3b20
2019-09-18 18:26:32 +09:00
Takayuki Nakata c27aaf1a8f
[bundler/bundler] Fix comments and messages to refer to https url
https://github.com/bundler/bundler/commit/a86b49f1b9
2019-09-18 18:26:32 +09:00
David Rodríguez b9996803f7
[bundler/bundler] Remove duplicated spec filter
https://github.com/bundler/bundler/commit/b7fc6f4187
2019-09-18 18:26:32 +09:00
David Rodríguez a29ead52e1
[bundler/bundler] Deprecate `--path` flag to `bundle check`
https://github.com/bundler/bundler/commit/0a0e7cf5ec
2019-09-18 18:26:32 +09:00
Nobuyoshi Nakada 751d4ab9c2
Refine Timezone fixture 2019-09-15 21:55:34 +09:00
Yusuke Endoh cce6cfbe48 Make test-all and test-spec runnable on Android
Calling some syscall functions such as Dir.chroot causes SIGSYS instead
of EPERM on Android.
This change skips all tests that stops the test-suite run.
2019-09-09 20:24:03 +09:00
Benoit Daloze b10940a839 Improve Proc#to_s specs 2019-09-08 12:41:14 +02:00
Nobuyoshi Nakada aedf6946a7
Removed useless braces to suppress a warning 2019-09-08 12:54:06 +09:00
Benoit Daloze 324dd9d01f armv7l and armv7l are the same platform, generalize to armv7
[Bug #16007]
2019-09-07 12:53:47 +02:00
David Rodríguez 2a166cfea2 Add `File.absolute_path?` (#2198)
In order to check whether a path is absolute or not in a portable way.

[Feature #15868]
2019-09-05 20:00:50 +09:00
Jeremy Evans 4a3972c261 Remove bad expectation in spec
This spec should not be checking where methods are defined, only
that the method works as expected (returns a Lazy instance).
2019-09-03 11:30:49 -07:00
Nobuyoshi Nakada 6f206b8ec6
Prohibit nul-separated glob pattern [Feature #14643] (#2419) 2019-09-02 15:08:53 +09:00
Hiroshi SHIBATA 1756ec2065
Ignore the all of warnings with inline_spec.rb of bundler examples. 2019-09-01 08:56:00 +09:00
Jeremy Evans 3463e83192 Warn for keyword to last hash parameter when method has no optional/rest parameters
Previously, there was no warning in this case, even though we will
be changing the behavior in Ruby 3.

Fixes [Bug #14130]
2019-08-30 19:25:46 -07:00
Jeremy Evans b5b3afadfa Fix a couple of bundler issues with keyword argument separation
There are more issues than this, but hopefully this is enough
to get make test-bundler passing in CI.
2019-08-30 12:39:31 -07:00
Jeremy Evans a810f6cbef Update specs to handle non-Symbols for keyword splats in 2.7
Also handle some warnings for behavior that will change in 3.0.
2019-08-30 12:39:31 -07:00
Yusuke Endoh ba9adcc175 spec/ruby/core/unboundmethod/bind_call_spec.rb: Add ruby_version_is guard 2019-08-30 11:49:42 +09:00
Yusuke Endoh 09c940b17f spec/ruby/core/unboundmethod/bind_call_spec.rb: Added
For UnboundMethod#bind_call [Feature #15955] introduced in
002e592e0d67bb0271d16314a32380ad947c9ae9.
2019-08-30 11:13:00 +09:00
Nobuyoshi Nakada d3e0bc07e2
Fixed a comment [ci skip]
A range literal in conditional expression is turned into a
flip-flop, as a Range object is never falsy and does not make a
sense.
2019-08-29 11:23:16 +09:00
Nobuyoshi Nakada d92289cd8d
Revert "Remove warnings of flip-flop deprecation from tests and specs"
This reverts commit bf7a32d220.

flip-flop is no longer deprecated.

[Feature #5400]
2019-08-29 11:10:45 +09:00
Nobuyoshi Nakada 6a0d2bc2af
Follows callback declaration updates 2019-08-28 00:09:14 +09:00
Takashi Kokubun eaff19de2b
Fix rb_thread_create argument type
in response to the declaration change in
e3fc30564e.

Fixing the AppVeyor mswin CI failure:
https://ci.appveyor.com/project/ruby/ruby/builds/26980881/job/2j6h1qwjnbc8cpop

ref: https://github.com/ruby/ruby/pull/2404
2019-08-27 23:41:52 +09:00
Hiroshi SHIBATA d9b73dcc0d Remove github_action_linux tag from bundler examples.
Maybe it has fixed at 5a384e2c08
2019-08-23 19:05:45 +10:00
Nobuyoshi Nakada 4419b5dbc2
The investigation is going on... 2019-08-21 13:31:22 +09:00
lolwut a230e65e8b
[bundler/bundler] Freeze time to avoid failures at midnight
Specify just a string

set @built_at as nil before testing

https://github.com/bundler/bundler/commit/578ec96c9c
2019-08-21 08:10:49 +09:00
Hiroshi SHIBATA 1c2774526e
[bundler/bundler] Share test fixtures with parallel_tests
https://github.com/bundler/bundler/commit/a38161c5be
2019-08-21 08:10:49 +09:00
Hiroshi SHIBATA 10011f4371
[bundler/bundler] Try to use RunTimeLogger for parallel_tests
https://github.com/bundler/bundler/commit/faccc522d1
2019-08-21 08:10:48 +09:00
David Rodríguez ace88852f2
[bundler/bundler] Parallelize test suite
https://github.com/bundler/bundler/commit/23007cb107
2019-08-21 08:10:48 +09:00
David Rodríguez ede77d82e7
[bundler/bundler] Fix a couple of typos
https://github.com/bundler/bundler/commit/52b6b94068
2019-08-21 07:58:46 +09:00
David Rodríguez 1120bacd8b
[bundler/bundler] Remove the :ruby exclusion tag
Our current set of specs is the same for all supported rubies, and we
should keep it that way.

https://github.com/bundler/bundler/commit/c9dc0f6f2c
2019-08-21 07:58:46 +09:00
David Rodríguez bcc4ac924d
[bundler/bundler] Remove another 1.8.7 specific bit
https://github.com/bundler/bundler/commit/8c7942d2c6
2019-08-21 07:58:46 +09:00
David Rodríguez 5ea08883cf
[bundler/bundler] Remove old rubies stuff no longer needed
https://github.com/bundler/bundler/commit/36fb3287f4
2019-08-21 07:58:46 +09:00
Nobuyoshi Nakada dd58c4ba35
Investigation of a sporadic error at Github Actions 2019-08-20 16:07:43 +09:00
David Rodríguez 5a384e2c08 Fix some bundler specs (#2380)
* These seem to consistenly pass already

* Show actual command when running `make test-bundler`

Current the setup command that installs the necessary gems for testing
bundler was printed, but not the actual command that runs the tests.
That was a bit confusing.

* Borrow trick from setproctitle specs

* A title that long doesn't get set sometimes

No idea why, but the test doesn't need that the title is that long.

* Fix most gem helper spec ruby-core failures

* Fix the rest of the gem helper failures

* Fix version spec by improving the assertion

* Remove unnecessary `BUNDLE_RUBY` environment var

We can use `RUBY` when necessary, and `BUNDLE_RUBY` is not a good name
because bundler considers `BUNDLE_*` variables as settings.

* Rename `BUNDLE_GEM` to `GEM_COMMAND`

This is more descriptive I think, and also friendlier for bundler
because `BUNDLE_` env variables are interpreted by bundler as settings,
and this is not a bundler setting.

This fixes one bundler spec failure in config specs against ruby-core.

* Fix quality spec when run in core

Use the proper path helper.

* Fix dummy lib builder to never load default gems

If a dummy library is named as a default gem, when requiring the library
from its executable, the default gem would be loaded when running from
core, because in core all default gems share path with bundler, and thus
they are always in the $LOAD_PATH. We fix the issue by loading lib
relatively inside dummy lib executables.

* More exact assertions

Sometimes I have the problem that I do some "print debugging" inside
specs, and suddently the spec passes. This happens when the assertion is
too relaxed, and the things I print make it match, specially when they
are simple strings like "1.0" than can be easily be part of gem paths
that I print for debugging.

I fix this by making a more exact assertion.

* Detect the correct shebang when ENV["RUBY"] is set

* Relax assertion

So that the spec passes even if another paths containing "ext" are in
the load path. This works to fix a ruby-core issue, but it's a better
assertion in general. We just want to know that the extension path was
added.

* Use folder structure independent path helper

It should fix this spec for ruby-core.

* Fix the last failing spec on ruby-core

* Skip `bundle open <default_gem>` spec when no default gems
2019-08-20 09:46:31 +09:00
Hiroshi SHIBATA d3da1d57d3
Skip open_spec.rb:L95 because ruby repo doesn't have json as default gems. 2019-08-18 15:02:21 +09:00