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

12395 Коммитов

Автор SHA1 Сообщение Дата
Stan Lo 5809b75019 [ruby/irb] Debugging command warning should not be specific to the
`debug` command
(https://github.com/ruby/irb/pull/806)

https://github.com/ruby/irb/commit/b7b57311cc
2023-12-07 16:09:15 +00:00
Kevin Newton 10bc0bd4ab [ruby/prism] Remove warnings check from parse_success? method
https://github.com/ruby/prism/commit/e30a241fb3
2023-12-07 14:39:11 +00:00
Hiroshi SHIBATA a41d6c825c [ruby/open-uri] Bump up 0.4.1
https://github.com/ruby/open-uri/commit/d72508a7f4
2023-12-07 07:22:20 +00:00
Andrew Kane 41c00bc97e [ruby/open-uri] Set default for max_redirects and add exception class
https://github.com/ruby/open-uri/commit/dcdcb885cc
2023-12-07 07:00:54 +00:00
Andrew Kane d97479f9c9 [ruby/open-uri] Add :max_redirects option
https://github.com/ruby/open-uri/commit/7fd5ea09a7
2023-12-07 07:00:53 +00:00
Ellen Marie Dash 7d32830b8c [rubygems/rubygems] Make --build-root disable auto-user-install.
https://github.com/rubygems/rubygems/commit/6a06b0763f
2023-12-07 13:56:23 +09:00
David Rodríguez 33bd956257 [rubygems/rubygems] Better approach to falling back to user installation when GEM_HOME not writable
https://github.com/rubygems/rubygems/commit/f67bced16b
2023-12-07 13:56:22 +09:00
Vít Ondruch aabf2ce181 [rubygems/rubygems] Use globals variables for standard input/output
Replace use of `STDIN`, `STDOUT` and `STDERR` constants by their
`$stdin`, `$stdout` and `$stderr` global variable equivalents.

This enables easier testing via standard means, such as `assert_output`
for minitest or `expect { print 'foo' }.to output.to_stdout` for RSpec
test suites.

https://github.com/rubygems/rubygems/commit/a0a6fc1b76
2023-12-07 13:55:31 +09:00
Hiroshi SHIBATA 214f6d6598 Move replace_require into bundled_gems.rb 2023-12-07 11:37:08 +09:00
Kevin Newton fe6ee5e921 [ruby/prism] Move flag position consistently to front
https://github.com/ruby/prism/commit/6e69a81737
2023-12-06 20:50:02 +00:00
Eric Mueller 9336bbb0b2 [rubygems/rubygems] Bundler::Fetcher uses Bundler::CIDetector
Additionally, the result is memoized, as it's used twice in a row.

This change does result in a net behavioral diff, as the list of ENVs
being checked has been updated (now includes buildkite, taskcluster,
cirrus, dsari, and drops buildbox and snap)

https://github.com/rubygems/rubygems/commit/3fb445a5a1
2023-12-06 20:05:25 +00:00
Eric Mueller 6fd3b358ff [rubygems/rubygems] Duplicate Gem::CIDetector into bundler
Because bundler needs to support older versions of rubygems, we can't
actually rely on Gem::CIDetector (yet - in a year or so they might be
able to consolidate, if they don't change futher). So we're copying it
into the Bundler:: namespace, and enforcing that they stay completely in
sync with a test. No other tests are needed, since Gem::CIDetector is
already tested, and this is and will remain identical.

https://github.com/rubygems/rubygems/commit/abc67f0da1
2023-12-06 20:05:25 +00:00
Eric Mueller a6c912a80d [rubygems/rubygems] Gem::UpdateSuggestion uses Gem::CIDetector
https://github.com/rubygems/rubygems/commit/e5b0458342
2023-12-06 20:05:24 +00:00
Eric Mueller b1b78c4f9f [rubygems/rubygems] Introduce the Gem::CIDetector
This is based on the list in Gem::UpdateSuggestion and Bundler::Fetcher;
these have similar purposes (determining whether/what CI we're executing
in), and can benefit from being combined and updated (they're both
slightly out of date).

Noteable changes:
* We'll consider ourselves to be on a CI in more cases - if CI_NAME or
  TASKCLUSTER_ROOT_URL are set specifically, since those represent two
  cases that were either overlooked or are no longer covered by the
  existing implementation. (Or possibly TaskCluster still does provide
  RUN_ID, but failed to document it)
* We will notice/track a few additional services in ci_strings (cirrus,
  dsari, taskcluster), stop tracking 'snap' (they went under in 2017),
  and update buildbox to buildkite (they've been called that for 8
  years, and the BUILDBOX envs have been deprecated for 3).
* We'll also sort/uniq/downcase the values (all of which only matter
  because of the special case of CI_NAME).

https://github.com/rubygems/rubygems/commit/60652b942f
2023-12-06 20:05:23 +00:00
Hiroshi SHIBATA d411d8f5fe [rubygems/rubygems] Try to load Gem::BUNDLED_GEMS on Bundler
`bundle exec ruby foo.rb` ignore to load gem_prelude.rb. Because warnings feature
  is not working with `bundle exec ruby`.

https://github.com/rubygems/rubygems/commit/a0d4ed92a7
2023-12-06 10:10:44 +00:00
Nobuyoshi Nakada e03e872eea [ruby/rdoc] Only word-ending colon separates new definition
When followed by non-space characters, rather it looks like a URL or a
path name on Windows.

https://github.com/ruby/rdoc/commit/72c6560773
2023-12-06 09:35:44 +00:00
Nobuyoshi Nakada 379f06797d [ruby/rdoc] Needs more backslash to match escaping backslashs
https://github.com/ruby/rdoc/commit/1904e9076d
2023-12-06 09:35:43 +00:00
Martin Emde d9a1bb4b09 [rubygems/rubygems] Use String#unpack1 available since ruby 3.0
https://github.com/rubygems/rubygems/commit/46258d6cb4
2023-12-06 02:45:37 +00:00
Martin Emde 5f0ea3f590 [rubygems/rubygems] Converts Bundler lockfile checksum validation to opt-in only
Looks for the CHECKSUMS section in the lockfile, activating the feature
only if the section exists. Without a CHECKSUMS section, Bundler will
continue as normal, validating checksums when gems are installed while
checksums from the compact index are present.

https://github.com/rubygems/rubygems/commit/2353cc93a4
2023-12-05 21:09:53 +00:00
Schneems c175e265da [ruby/syntax_suggest] Remove duplicate error messages
Before:

```
Expected a newline or semicolon after the statement
Cannot parse the expression
Expected a newline or semicolon after the statement
Cannot parse the expression

   1  describe "webmock tests" do
  22    it "body" do
  27      query = Cutlass::FunctionQuery.new(
> 28        port: port
> 29        body: body
  30      ).call
  34    end
  35  end
```

After:

```
Expected a newline or semicolon after the statement
Cannot parse the expression

   1  describe "webmock tests" do
  22    it "body" do
  27      query = Cutlass::FunctionQuery.new(
> 28        port: port
> 29        body: body
  30      ).call
  34    end
  35  end
```

https://github.com/ruby/syntax_suggest/commit/becf097e5e
2023-12-05 17:51:29 +00:00
Schneems 6d39d6d214 [ruby/syntax_suggest] Update docs, clean up PR
Removes or updates mentions of Ripper

https://github.com/ruby/syntax_suggest/commit/08aaa3f50a
2023-12-05 17:51:29 +00:00
Schneems 62c9695911 [ruby/syntax_suggest] Support lexing with Prism
https://github.com/ruby/syntax_suggest/commit/7f4176a914
2023-12-05 17:51:28 +00:00
Schneems cce29750d7 [ruby/syntax_suggest] Initial support for the prism parser
Prism will be the parser in Ruby 3.3. We need to support 3.0+ so we will have to "dual boot" both parsers.

Todo:

- LexAll to support Prism lex output
- Add tests that exercise both Ripper and prism codepaths on CI
- Handle https://github.com/ruby/prism/issues/1972 in `ripper_errors.rb`
- Update docs to not mention Ripper explicitly
- Consider different/cleaner APIs for separating out Ripper and Prism

https://github.com/ruby/syntax_suggest/commit/a7d6991cc4
2023-12-05 17:51:27 +00:00
Stan Lo b29ed63883 [ruby/irb] Bump version to v1.10.1
(https://github.com/ruby/irb/pull/801)

https://github.com/ruby/irb/commit/a1e431bd83
2023-12-05 16:34:19 +00:00
Stan Lo f55746a93d [ruby/irb] Disable pager when TERM is not set too
(https://github.com/ruby/irb/pull/802)

https://github.com/ruby/irb/commit/173980974b
2023-12-05 16:32:13 +00:00
Stan Lo ef387e6730 [ruby/irb] Pager should be disabled when TERM=dumb
(https://github.com/ruby/irb/pull/800)

For apps/libs that test against IRB, it's recommended to set `TERM=dumb`
so they get minimum disruption from Reline's interactive-focus features.

Therefore, we should follow the convention to disable pager when `TERM=dumb`.

https://github.com/ruby/irb/commit/8a3002a39e
2023-12-05 16:03:06 +00:00
Nobuyoshi Nakada 113f5d7fd7 [ruby/rdoc] Allow any single-word token upto 2 before C method implementation
Previously only unknown word `intern` is allowed between a single-word
token before a C method.  Now any single-word token, such as `inline`
which is used for `ArithmeticSequence` in enumerator.c, is allowed
instead.

https://github.com/ruby/rdoc/commit/3a214c1dd1
2023-12-05 08:48:19 +00:00
Nobuyoshi Nakada c0baa3783f [ruby/rdoc] Reduce matched substring allocations
https://github.com/ruby/rdoc/commit/aaed688a97
2023-12-05 08:48:18 +00:00
Hiroshi SHIBATA d691b1a141 [ruby/rdoc] Bump up 6.6.1
https://github.com/ruby/rdoc/commit/7cf353a696
2023-12-05 07:37:08 +00:00
Hiroshi SHIBATA f19de1289b [ruby/tempfile] Bump up 0.2.1
https://github.com/ruby/tempfile/commit/1450bb4f1c
2023-12-05 07:02:17 +00:00
Akshay Birajdar 494e2e4bfb [ruby/tempfile] Alias #to_s to #inspect
https://github.com/ruby/tempfile/commit/e515889412
2023-12-05 06:43:42 +00:00
Hiroshi SHIBATA e7cc791838 [ruby/cgi] Bump up 0.4.1
https://github.com/ruby/cgi/commit/929e6264b5
2023-12-05 06:38:55 +00:00
Toshimaru 56ccad060d [ruby/rdoc] Early return when `token_stream` is `nil`
https://github.com/ruby/rdoc/commit/04f75d8516

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-12-05 06:21:52 +00:00
toshimaru cda431f538 [ruby/rdoc] fix: fix `NoMethodError` when `token_stream` is nil
The change in #1055 might be a breaking change.
So, just simply wrap `token_stream` with `Array`

https://github.com/ruby/rdoc/commit/d8c19d7fa1

Co-authored-by: Jonathan Hefner <jonathan@hefner.pro>
2023-12-05 06:21:51 +00:00
David Rodríguez 16669cd6ad [rubygems/rubygems] Fix crash when duplicating a dev dependency in Gemfile & gemspec
https://github.com/rubygems/rubygems/commit/e78c0a4a48
2023-12-05 14:28:42 +09:00
David Rodríguez 7ab877761e [rubygems/rubygems] Instead of checking writability, try to write
Checking writability is prone to errors. For example:

$ mkdir -p foo/bar
$ chmod -w foo
$ touch foo/bar/baz # succeeds even if foo is not writable

https://github.com/rubygems/rubygems/commit/6056138b6a
2023-12-05 14:28:41 +09:00
Mau Magnaguagno 57178a9720 [rubygems/rubygems] Prefer String#split with block in Gem::YAMLSerializer#load
String#split supports a block since Ruby 2.6, avoiding intermediate array.

https://github.com/rubygems/rubygems/commit/69cdf9e9d4
2023-12-05 14:28:39 +09:00
Mau Magnaguagno 5f789350dc [rubygems/rubygems] Prefer String#split with block in Bundler::CompactIndexClient::Cache#versions
String#split supports a block since Ruby 2.6, avoiding intermediate array.

https://github.com/rubygems/rubygems/commit/4e864a8f2e
2023-12-05 14:28:39 +09:00
Mau Magnaguagno a3cd7b3e27 [rubygems/rubygems] Prefer String#split with block in Bundler::YAMLSerializer#load
String#split supports a block since Ruby 2.6, avoiding intermediate array.

https://github.com/rubygems/rubygems/commit/5b324969cd
2023-12-05 14:28:38 +09:00
Schneems 5a2d70ef73 [ruby/syntax_suggest] Bump minimum Ruby version & update standardrb
https://github.com/ruby/syntax_suggest/commit/73753518e9
2023-12-04 22:29:44 +00:00
Schneems 13482ab1e6 [ruby/syntax_suggest] Update standardrb to Ruby 3.0 standards
https://github.com/ruby/syntax_suggest/commit/2771dcabe0
2023-12-04 22:18:40 +00:00
Kevin Newton d35aa58b2f [ruby/prism] Fix up docs for lex_compat
https://github.com/ruby/prism/commit/9131e84060
2023-12-04 17:15:19 +00:00
Kevin Newton ea9f89eeb6 [ruby/prism] Ripper compat docs update
https://github.com/ruby/prism/commit/5f70b32b02
2023-12-04 17:00:14 +00:00
Stan Lo 52eabf2e32 [ruby/irb] Bump version to v1.10.0
(https://github.com/ruby/irb/pull/798)

https://github.com/ruby/irb/commit/4acc9b8d6c
2023-12-03 17:06:41 +00:00
jinroq d4b1f56f50
[Fix] Support when nil is assigned to variable `name` (#9105)
* Add `!name.nil?` to if condition
2023-12-02 13:17:53 -08:00
Nobuyoshi Nakada c9c1670f7e [ruby/rdoc] Markup punctuations need to be separated with a space
https://github.com/ruby/rdoc/commit/83f0149fc1
2023-12-02 12:40:12 +00:00
Gary Tou 4ee1f0fb5d [ruby/irb] Implement `history` command
(https://github.com/ruby/irb/pull/761)

* Implement `history` command

Lists IRB input history with indices. Also aliased as `hist`.

* Add tests for `history` command

* Address feedback: `puts` with multiple arguments instead of `join`ing

* Address feedback: Handle nil from splitting an empty input string

* Refactor line truncation

* Add `-g` grep option to `history` command

* Add `history` command to README

* Remove unused `*args` parameter

* Allow spaces to be included in grep

* Allow `/` to be included in grep regex

* Handle `input` being an empty string

* Exclude "#{index}: " from matching the grep regex

* Add new line after joining

https://github.com/ruby/irb/commit/3f9eacbfa9
2023-12-02 04:32:04 +00:00
Kevin Newton 492c82cb41 [ruby/prism] Prism.parse_success?(source)
A lot of tools use Ripper/RubyVM::AbstractSyntaxTree to determine
if a source is valid. These tools both create an AST instead of
providing an API that will return a boolean only.

This new API only creates the C structs, but doesn't bother
reifying them into Ruby/the serialization API. Instead it only
returns true/false, which is significantly more efficient.

https://github.com/ruby/prism/commit/7014740118
2023-12-01 20:53:34 +00:00
Samuel Giddins 0ed55bf097 [rubygems/rubygems] Reduce array allocations when loading definition
The same array was being re-created in a loop (as well as the `generic_local_platform`), which is avoidable by hoisting it to a frozen array created once

https://github.com/rubygems/rubygems/commit/009a3c6d0d
2023-12-01 19:50:03 +00:00
Kevin Newton ec83bd7356 [ruby/prism] Provide heredoc? queries
https://github.com/ruby/prism/commit/e148e8fe6a
2023-12-01 18:46:52 +00:00