aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* [rubygems/rubygems] Reduce allocations when installing gems with bundlerSamuel Giddins2023-11-261-4/+9
| | | | | | | | | | | | | | | | | ``` ==> memprof.after.txt <== Total allocated: 1.13 MB (2352 objects) Total retained: 10.08 kB (78 objects) ==> memprof.before.txt <== Total allocated: 46.27 MB (38439 objects) Total retained: 9.94 kB (75 objects) ``` Yes, we were allocating 45MB of arrays in `dependencies_installed?`, it was accidentally cubic. https://github.com/rubygems/rubygems/commit/13ab874388
* [ruby/irb] Display aliases in help messageStan Lo2023-11-263-5/+19
| | | | | | | | | | | | | | | | | (https://github.com/ruby/irb/pull/788) Similar to Pry, it displays user-defined aliases in the help message with a dedicated section. With the current default aliases, it looks like: ``` ...other sections... Aliases $ Alias for `show_source` @ Alias for `whereami` ``` https://github.com/ruby/irb/commit/2a0eacc891
* [ruby/irb] Support disabling pagerStan Lo2023-11-263-1/+5
| | | | | | | | | | | (https://github.com/ruby/irb/pull/783) With either `IRB.conf[:USE_PAGER] = false` or `--no-pager` commnad line flag. I decided use `--no-pager` instead of `--use-pager` because it matches with Pry and git's command line flags. https://github.com/ruby/irb/commit/df1c3b9042
* [ruby/resolv] Support a :use_ipv6 option to Resolv#initializeJeremy Evans2023-11-251-2/+15
| | | | | | | | | When set, supports returning IPv6 results even if there is no public IPv6 address for the system. Implements Ruby Feature #14922 https://github.com/ruby/resolv/commit/09d141de38
* [ruby/irb] Fix exception(backtrace=nil) prints nothingtomoya ishida2023-11-251-35/+32
| | | | | | (https://github.com/ruby/irb/pull/782) https://github.com/ruby/irb/commit/fa9ecf9a5b
* [ruby/resolv] Support a :raise_timeout_errors option to raise timeouts as ↵Jeremy Evans2023-11-251-0/+6
| | | | | | | | | | Resolv::ResolvError This allows to differentiate a timeout from an NXDOMAIN response. Fixes [Bug #18151] https://github.com/ruby/resolv/commit/c0e5abab76
* [ruby/resolv] Fix the fallback from UDP to TCP due to message truncationJeremy Evans2023-11-241-2/+4
| | | | | | | | | | If truncation is detected, return immediately from decode so that the UDP connection can be retried with TCP, instead of failing to decode due to trying to decode a truncated response. Fixes [Bug #13513] https://github.com/ruby/resolv/commit/0de996dbca
* [rubygems/rubygems] Fix typo missing doMau Magnaguagno2023-11-241-1/+1
| | | | https://github.com/rubygems/rubygems/commit/4eade32ad6
* [rubygems/rubygems] Prefer String#each_line in Gem::CommandMau Magnaguagno2023-11-241-4/+4
| | | | | | Replace ``String#split("\n").each`` with ``String#each_line``. https://github.com/rubygems/rubygems/commit/958744807d
* [ruby/resolv] Catch EPROTONOSUPPORT as a sign of no IPv6 as wellKJ Tsanaktsidis2023-11-241-1/+1
| | | | | | | | | | | | (https://github.com/ruby/resolv/pull/41) If IPv6 is disabled inside a freebsd jail, it seems this returns EPROTONOSUPPORT and not EAFNOSUPPORT. In both cases, we should simply try some other listed DNS servers. Fixes [Bug #19928] https://bugs.ruby-lang.org/issues/19928 https://github.com/ruby/resolv/commit/5e2d48708b
* [ruby/resolv] Implement dohpath SvcParamKasumi Hanazuki2023-11-241-0/+29
| | | | | | | | | | | | | | | | | | | | | | (https://github.com/ruby/resolv/pull/33) * Implement dohpath SvcParam [RFC 9461] This patch implements "dohpath" SvcParam proposed in [draft-ietf-add-svcb-dns-08]. This parameter specifies a URI template for the :path used in DNS-over-HTTPS requests. "dohpath" is employed by [DDR], also a to-be-published Proposed Standard that specifies how to upgrade DNS transport to a more secure one, i.d., DNS-over-TLS or DNS-over-HTTPS. DDR is deployed in the public DNS resolvers including Cloudflare DNS, Google Public DNS, and Quad9. [RFC 9461]: https://datatracker.ietf.org/doc/rfc9461/ [DDR]: https://datatracker.ietf.org/doc/draft-ietf-add-ddr/ https://github.com/ruby/resolv/commit/da9c023539 Co-authored-by: Sorah Fukumori <her@sorah.jp>
* [ruby/resolv] Implement SVCB and HTTPS RRsKasumi Hanazuki2023-11-241-0/+429
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://github.com/ruby/resolv/pull/32) * Add MessageDecoder#get_list This method repeats yielding until all the data upto the current limit is consumed, and then returns an Array containig the block results. * Implement SVCB and HTTPS RRs [RFC 9460] > This patch implements SVCB and HTTPS resource record types defined in > [RFC 9460]. > > The RR types are now supported by many server implementations including > BIND, unbound, PowerDNS, and Knot DNS. Major browsers such as Chrome, > Edge, and Safari have started to query HTTPS records, with the records > gradually adopted by websites. Also, SVCB is actually deployed in the > public DNS resolvers such as Cloudflare DNS and Google Public DNS for > [DDR]. > > With such wide adoption, we have plenty of real-world use cases, and > it is unlikely the wire format will change further in an incompatible > way. It is time to implement them in the client libraries! > > # Rationale for proposed API > > ## `Resolv::DNS::Resource::IN::ServiceBinding` > > This is an abstract class for SVCB-compatible RR types. > SVCB-compatible RR types, as defined in the Draft, shares the wire > format and the semantics of their RDATA fields with SVCB to allow > implementations to share the processing of these RR types. So we do > so. > > The interface of this class is straightforward: It has three > attributes `priority`, `target`, and `params`, which correspond the > RDATA fields SvcPriority, TargetName, and SvcParams, resp. > > SVCB RR type is defined specifically within IN class. Thus, this > class is placed in the `Resolv::DNS::Resource::IN` namespace. > > ## `Resolv::DNS::Resource::IN::SVCB`, `Resolv::DNS::Resource::IN::HTTPS` > > Just inherits ServiceBinding class. > > ## `Resolv::DNS::SvcParam` > > This class represents a pair of a SvcParamKey and a SvcParamValue. > Aligned with the design of `Resolv::DNS::Resource`, each SvcParamKey > has its own subclass of `Resolv::DNS::SvcParam`. > > ## `Resolv::DNS::SvcParam::Generic` > > This is an abstract class representing a SvcParamKey that is unknown > to this library. `Generic.create(key)` dynamically defines its > subclass for specific `key`. E.g., `Generic.create(667)` will define > `Generic::Key667`. > > This class holds SvcParamValue in its wire format. > > SvcParam with an unknown SvcParamKey will be decoded as a subclass of > this class. Also, users of this library can generate a non-supported > SvcParam if they know its wire format. > > ## `Resolv::DNS::SvcParams` > > This is conceptually a set of `SvcParam`s, whose elements have the > unique SvcParamKeys. It behaves like a set, and for convenience > provides indexing by SvcParamKey. > > - `#initialize(params)` takes an Enumerable of `SvcParam`s as the > initial content. If it contains `SvcParam`s with the duplicate key, > the one that appears last takes precedence. > - `#[](key)` fetches the `SvcParam` with the given key. The key can be > specified by its name (e.g., `:alpn`) or number (e.g., `1`). > - `#add(param)` adds a `SvcParam` to the set. If the set already has a > `SvcParam` with the same key, it will be replaced. > - `#delete(key)` deletes a `SvcParam` by its key and returns it. The key > can be specified by its name or number. * Update comments referring to draft-ietf-dnsop-svcb-https-12 Published as RFC 9460. https://datatracker.ietf.org/doc/rfc9460/ [draft-ietf-dnsop-svcb-https-12]: https://datatracker.ietf.org/doc/draft-ietf-dnsop-svcb-https/12/ [RFC 9460]: https://datatracker.ietf.org/doc/rfc9460/ [DDR]: https://datatracker.ietf.org/doc/draft-ietf-add-ddr/ https://github.com/ruby/resolv/commit/b3ced7f039
* [rubygems/rubygems] Don't require 'json' unless it's actually neededEric Mueller2023-11-231-2/+1
| | | | https://github.com/rubygems/rubygems/commit/97ee203fd5
* [rubygems/rubygems] Add --json bundle-outdated flag to produce ↵Eric Mueller2023-11-232-4/+45
| | | | | | json-parseable output https://github.com/rubygems/rubygems/commit/65efa44bc0
* [rubygems/rubygems] Factor group-filtering to a private method to reduce ↵Eric Mueller2023-11-231-16/+16
| | | | | | | | | repetition We're about to expand the repeated bit of code, so drying it up a little is warranted. https://github.com/rubygems/rubygems/commit/e69c658be6
* [ruby/irb] Handle handle_exception's exceptiontomoya ishida2023-11-231-1/+8
| | | | | | (https://github.com/ruby/irb/pull/780) https://github.com/ruby/irb/commit/d42138c477
* [ruby/irb] Hint debugger command in irb:rdbg sessionStan Lo2023-11-231-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | (https://github.com/ruby/irb/pull/768) When user enters irb:rdbg session, they don't get the same hint that the `debug` gem provides, like ``` (rdbg) n # next command ``` This means that users may accidentally execute commands when they want to retrieve the value of a variable. So this commit adds a Reline output modifier to add a simiar hint: ``` irb:rdbg(main):002> n # debug command ``` It is not exactly the same as `debug`'s because in this case the importance is to help users distinguish between value evaluation and debugger command execution. https://github.com/ruby/irb/commit/fdf24de851
* [ruby/irb] Fix failure of more command with -R optionhogelog2023-11-231-1/+1
| | | | | | (https://github.com/ruby/irb/pull/781) https://github.com/ruby/irb/commit/7d6849e44e
* [ruby/irb] Require prism >= 0.18.0 (MatchWriteNode#targets andtomoya ishida2023-11-222-19/+31
| | | | | | | CaseMatchNode) (https://github.com/ruby/irb/pull/778) https://github.com/ruby/irb/commit/943c14b12e
* [ruby/prism] Add new doc to gemspecKevin Newton2023-11-221-0/+1
| | | | https://github.com/ruby/prism/commit/99dfca6c1d
* [ruby/prism] Add `CP949` encodingheyogrady2023-11-221-0/+1
| | | | https://github.com/ruby/prism/commit/9e78dfdf69
* [rubygems/rubygems] Fix universal lockfiles regressionDavid Rodriguez2023-11-223-4/+6
| | | | | | | | | | | | If a platform specific variant would not match the current Ruby, we would still be considering it compatible with the initial resolution and adding its platform to the lockfile, but we would later fail to materialize it for installation due to not really being compatible. Fix is to only add platforms for variants that are also compatible with current Ruby and RubyGems versions. https://github.com/rubygems/rubygems/commit/75d1290843
* [ruby/prism] Move CallNode#name field between receiver and argumentsBenoit Daloze2023-11-221-1/+1
| | | | | | | | * The same order as in source code. * CallOrWriteNode, CallOperatorWriteNode, CallAndWriteNode already have the correct order so it was also inconsistent with them. https://github.com/ruby/prism/commit/4434e4bc22
* [ruby/irb] Rescue Exception, ignore warning in completiontomoya ishida2023-11-221-3/+9
| | | | | | | doc_namespace (https://github.com/ruby/irb/pull/777) https://github.com/ruby/irb/commit/c2f671611a
* [ruby/resolv] IPv6: update to_s method to be RFC5952 compliantJohn Bond2023-11-221-5/+1
| | | | | | | | | | | | | | | | | | | (https://github.com/ruby/resolv/pull/25) * IPv6: update to_s method to be RFC5952 compliant I noticed that the resolv library does not honour RFC 5952 Section 4.2.2. in relation to textural representation of ipv6 addresses: The symbol "::" MUST NOT be used to shorten just one 16-bit 0 field. For example, the representation 2001:db8:0:1:1:1:1:1 is correct, but 2001:db8::1:1:1:1:1 is not correct. Fixes https://github.com/ruby/resolv/pull/24 https://github.com/ruby/resolv/commit/5efcd6ed70 Co-authored-by: Sorah Fukumori <sora134@gmail.com>
* [ruby/open3] [DOC] Open3 doc (https://github.com/ruby/open3/pull/21)Burdette Lamar2023-11-211-106/+170
| | | | https://github.com/ruby/open3/commit/3bdb402b18
* [rubygems/rubygems] Fix invalid platform removal missing adjacent platformsBo Anderson2023-11-211-1/+1
| | | | https://github.com/rubygems/rubygems/commit/4ce66c41a2
* [ruby/prism] Update to v0.18.0Kevin Newton2023-11-211-1/+1
| | | | https://github.com/ruby/prism/commit/1398879d79
* [ruby/prism] Fix constant path full name when parent is not aVinicius Stock2023-11-211-0/+12
| | | | | | | | | | | | | | | | | constant (https://github.com/ruby/prism/pull/1742) * Raise if constant path parts contains nodes that can't be used to build full name * Fix typo in constant path error documentation Co-authored-by: Tim Morgan <tim@timmorgan.org> --------- https://github.com/ruby/prism/commit/d73a053262 Co-authored-by: Tim Morgan <tim@timmorgan.org>
* [ruby/prism] Warning for ENDs in methodsHaldun Bayhantopcu2023-11-211-1/+1
| | | | | | (https://github.com/ruby/prism/pull/1899) https://github.com/ruby/prism/commit/1b41c2d56c
* [ruby/irb] Bump version to 1.9.1tomoya ishida2023-11-211-2/+2
| | | | | | (https://github.com/ruby/irb/pull/773) https://github.com/ruby/irb/commit/997df3e849
* Rename the big5-hkscs stuff to something more generic and add UAO sharing ↵Ryan Garver2023-11-201-1/+0
| | | | | | common code. Merge the Big5 extensions into pm_big5.c
* [ruby/irb] Enable Setting Completer Type through `IRB_COMPLETOR`ima1zumi2023-11-211-1/+1
| | | | | | | | | | | | | | | | (https://github.com/ruby/irb/pull/771) I propose introducing the capability to set the IRB completion kinds via an environment variable, specifically `IRB_COMPLETOR=type`. This feature aims to enhance the Rails console experience by allowing Rails users to specify their preferred completion more conveniently. Currently, when using the Rails console, there's no straightforward way to globally set the type completion across a Rails application repository. It's possible to configure this setting by placing a `.irbrc` file at the project root. However, using a .irbrc file is not ideal as it allows for broad configurations and can potentially affect the production environment. My suggestion focuses on allowing users to set the completion to 'type' in a minimal. This enhancement would be particularly beneficial for teams writing RBS in their Rails applications. This type completer, integrated with RBS, would enhance completion accuracy, improving the Rails console experience. https://github.com/ruby/irb/commit/032f6da25f
* [ruby/prism] Add character APIs for locationsKevin Newton2023-11-202-13/+47
| | | | | | (https://github.com/ruby/prism/pull/1809) https://github.com/ruby/prism/commit/d493ccd093
* [ruby/open3] [DOC] RDoc for Open3Burdette Lamar2023-11-191-23/+66
| | | | | | (https://github.com/ruby/open3/pull/20) https://github.com/ruby/open3/commit/4c9e7492eb
* [ruby/prism] Big5 HKSCS encodingRyan Garver2023-11-181-0/+1
| | | | https://github.com/ruby/prism/commit/3ca9823eb4
* [ruby/irb] Fix irb crash on `{}.` completiontomoya ishida2023-11-182-4/+7
| | | | | | (https://github.com/ruby/irb/pull/764) https://github.com/ruby/irb/commit/07e4d540cc
* [ruby/prism] Update gemspecMaple Ong2023-11-161-0/+1
| | | | https://github.com/ruby/prism/commit/1a10f6f9c0
* [ruby/open3] [DOC] RDoc for Open3Burdette Lamar2023-11-161-32/+57
| | | | | | (https://github.com/ruby/open3/pull/19) https://github.com/ruby/open3/commit/577bee9696
* Warn bundled gems before Ruby 3.4.0Hiroshi SHIBATA2023-11-161-4/+9
|
* Always revert or skip extended require of RubyGems.Hiroshi SHIBATA2023-11-161-5/+2
|
* [ruby/rdoc] Revert "chore: Remove unnecessary argument for `join` method"Nobuyoshi Nakada2023-11-161-1/+1
| | | | | | | | | This reverts commit https://github.com/ruby/rdoc/commit/4a1c74bc0a09. Since RDoc still supports ruby 2.6 which has not deprecated `$,`, the argument of `Array#join` is not unnecessary yet. https://github.com/ruby/rdoc/commit/72897d32ed
* [ruby/rdoc] chore: Remove unnecessary argument for `join` methodtoshimaru2023-11-161-1/+1
| | | | https://github.com/ruby/rdoc/commit/4a1c74bc0a
* [ruby/rdoc] fix: Fix NoMethodError for `tokens_to_s` methodtoshimaru2023-11-161-1/+1
| | | | | | | | | | | | Calling `tokens_to_s` gets an error if `token_stream` is nil: ``` undefined method `compact' for nil:NilClass (NoMethodError) ``` So, fall back to an empty array if `@token_stream` is nil. https://github.com/ruby/rdoc/commit/452e4a2600
* [ruby/prism] Track the then keyword for conditionalsKevin Newton2023-11-151-0/+1
| | | | https://github.com/ruby/prism/commit/fef0019a25
* [rubygems/rubygems] User bundler UA when downloading gemsSamuel Giddins2023-11-157-23/+47
| | | | | | | | | | | | | | | Gem::RemoteFetcher uses Gem::Request, which adds the RubyGems UA. Gem::RemoteFetcher is used to download gems, as well as the full index. We would like the bundler UA to be used whenever bundler is making requests. This PR also avoids unsafely mutating the headers hash on the shared `Gem::RemoteFetcher.fetcher` instance, which could cause corruption or incorrect headers when making parallel requests. Instead, we create one remote fetcher per rubygems remote, which is similar to the connection segregation bundler is already doing https://github.com/rubygems/rubygems/commit/f0e8dacdec
* [ruby/prism] Rename librubyparser to libprismKevin Newton2023-11-141-1/+1
| | | | | | | | librubyparser was an artifact of the prototype that was initially named ruby-parser. Instead, this renames it to libprism to be consistent with the actual name. https://github.com/ruby/prism/commit/8600b06811
* [ruby/rdoc] Fix TIDYLINK after bracesNobuyoshi Nakada2023-11-141-1/+1
| | | | | | | | (https://github.com/ruby/rdoc/pull/1015) TIDYLINK multi-word label should not include braces. https://github.com/ruby/rdoc/commit/41ad3191e9
* [rubygems/rubygems] improvement: include response body on fetch_http errorPaul Bob2023-11-141-1/+1
| | | | https://github.com/rubygems/rubygems/commit/de4189af35
* [rubygems/rubygems] TruffleRuby uses a bash prelude in default launchersBenoit Daloze2023-11-131-1/+2
| | | | https://github.com/rubygems/rubygems/commit/e119f4208a