summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2023-11-26[ruby/irb] Support disabling pagerStan Lo
(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
2023-11-25[ruby/resolv] Support a :use_ipv6 option to Resolv#initializeJeremy Evans
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
2023-11-25[ruby/irb] Fix exception(backtrace=nil) prints nothingtomoya ishida
(https://github.com/ruby/irb/pull/782) https://github.com/ruby/irb/commit/fa9ecf9a5b
2023-11-25[ruby/resolv] Support a :raise_timeout_errors option to raise timeouts as ↵Jeremy Evans
Resolv::ResolvError This allows to differentiate a timeout from an NXDOMAIN response. Fixes [Bug #18151] https://github.com/ruby/resolv/commit/c0e5abab76
2023-11-24[ruby/resolv] Fix the fallback from UDP to TCP due to message truncationJeremy Evans
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
2023-11-24[rubygems/rubygems] Fix typo missing doMau Magnaguagno
https://github.com/rubygems/rubygems/commit/4eade32ad6
2023-11-24[rubygems/rubygems] Prefer String#each_line in Gem::CommandMau Magnaguagno
Replace ``String#split("\n").each`` with ``String#each_line``. https://github.com/rubygems/rubygems/commit/958744807d
2023-11-24[ruby/resolv] Catch EPROTONOSUPPORT as a sign of no IPv6 as wellKJ Tsanaktsidis
(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
2023-11-24[ruby/resolv] Implement dohpath SvcParamKasumi Hanazuki
(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>
2023-11-24[ruby/resolv] Implement SVCB and HTTPS RRsKasumi Hanazuki
(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
2023-11-23[rubygems/rubygems] Don't require 'json' unless it's actually neededEric Mueller
https://github.com/rubygems/rubygems/commit/97ee203fd5
2023-11-23[rubygems/rubygems] Add --json bundle-outdated flag to produce ↵Eric Mueller
json-parseable output https://github.com/rubygems/rubygems/commit/65efa44bc0
2023-11-23[rubygems/rubygems] Factor group-filtering to a private method to reduce ↵Eric Mueller
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
2023-11-23[ruby/irb] Handle handle_exception's exceptiontomoya ishida
(https://github.com/ruby/irb/pull/780) https://github.com/ruby/irb/commit/d42138c477
2023-11-23[ruby/irb] Hint debugger command in irb:rdbg sessionStan Lo
(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
2023-11-23[ruby/irb] Fix failure of more command with -R optionhogelog
(https://github.com/ruby/irb/pull/781) https://github.com/ruby/irb/commit/7d6849e44e
2023-11-22[ruby/irb] Require prism >= 0.18.0 (MatchWriteNode#targets andtomoya ishida
CaseMatchNode) (https://github.com/ruby/irb/pull/778) https://github.com/ruby/irb/commit/943c14b12e
2023-11-22[ruby/prism] Add new doc to gemspecKevin Newton
https://github.com/ruby/prism/commit/99dfca6c1d
2023-11-22[ruby/prism] Add `CP949` encodingheyogrady
https://github.com/ruby/prism/commit/9e78dfdf69
2023-11-22[rubygems/rubygems] Fix universal lockfiles regressionDavid Rodriguez
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
2023-11-22[ruby/prism] Move CallNode#name field between receiver and argumentsBenoit Daloze
* 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
2023-11-22[ruby/irb] Rescue Exception, ignore warning in completiontomoya ishida
doc_namespace (https://github.com/ruby/irb/pull/777) https://github.com/ruby/irb/commit/c2f671611a
2023-11-22[ruby/resolv] IPv6: update to_s method to be RFC5952 compliantJohn Bond
(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>
2023-11-21[ruby/open3] [DOC] Open3 doc (https://github.com/ruby/open3/pull/21)Burdette Lamar
https://github.com/ruby/open3/commit/3bdb402b18
2023-11-21[rubygems/rubygems] Fix invalid platform removal missing adjacent platformsBo Anderson
https://github.com/rubygems/rubygems/commit/4ce66c41a2
2023-11-21[ruby/prism] Update to v0.18.0Kevin Newton
https://github.com/ruby/prism/commit/1398879d79
2023-11-21[ruby/prism] Fix constant path full name when parent is not aVinicius Stock
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>
2023-11-21[ruby/prism] Warning for ENDs in methodsHaldun Bayhantopcu
(https://github.com/ruby/prism/pull/1899) https://github.com/ruby/prism/commit/1b41c2d56c
2023-11-21[ruby/irb] Bump version to 1.9.1tomoya ishida
(https://github.com/ruby/irb/pull/773) https://github.com/ruby/irb/commit/997df3e849
2023-11-20Rename the big5-hkscs stuff to something more generic and add UAO sharing ↵Ryan Garver
common code. Merge the Big5 extensions into pm_big5.c
2023-11-21[ruby/irb] Enable Setting Completer Type through `IRB_COMPLETOR`ima1zumi
(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
2023-11-20[ruby/prism] Add character APIs for locationsKevin Newton
(https://github.com/ruby/prism/pull/1809) https://github.com/ruby/prism/commit/d493ccd093
2023-11-19[ruby/open3] [DOC] RDoc for Open3Burdette Lamar
(https://github.com/ruby/open3/pull/20) https://github.com/ruby/open3/commit/4c9e7492eb
2023-11-18[ruby/prism] Big5 HKSCS encodingRyan Garver
https://github.com/ruby/prism/commit/3ca9823eb4
2023-11-18[ruby/irb] Fix irb crash on `{}.` completiontomoya ishida
(https://github.com/ruby/irb/pull/764) https://github.com/ruby/irb/commit/07e4d540cc
2023-11-16[ruby/prism] Update gemspecMaple Ong
https://github.com/ruby/prism/commit/1a10f6f9c0
2023-11-16[ruby/open3] [DOC] RDoc for Open3Burdette Lamar
(https://github.com/ruby/open3/pull/19) https://github.com/ruby/open3/commit/577bee9696
2023-11-16Warn bundled gems before Ruby 3.4.0Hiroshi SHIBATA
2023-11-16Always revert or skip extended require of RubyGems.Hiroshi SHIBATA
2023-11-16[ruby/rdoc] Revert "chore: Remove unnecessary argument for `join` method"Nobuyoshi Nakada
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
2023-11-16[ruby/rdoc] chore: Remove unnecessary argument for `join` methodtoshimaru
https://github.com/ruby/rdoc/commit/4a1c74bc0a
2023-11-16[ruby/rdoc] fix: Fix NoMethodError for `tokens_to_s` methodtoshimaru
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
2023-11-15[ruby/prism] Track the then keyword for conditionalsKevin Newton
https://github.com/ruby/prism/commit/fef0019a25
2023-11-15[rubygems/rubygems] User bundler UA when downloading gemsSamuel Giddins
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
2023-11-14[ruby/prism] Rename librubyparser to libprismKevin Newton
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
2023-11-14[ruby/rdoc] Fix TIDYLINK after bracesNobuyoshi Nakada
(https://github.com/ruby/rdoc/pull/1015) TIDYLINK multi-word label should not include braces. https://github.com/ruby/rdoc/commit/41ad3191e9
2023-11-14[rubygems/rubygems] improvement: include response body on fetch_http errorPaul Bob
https://github.com/rubygems/rubygems/commit/de4189af35
2023-11-13[rubygems/rubygems] TruffleRuby uses a bash prelude in default launchersBenoit Daloze
https://github.com/rubygems/rubygems/commit/e119f4208a
2023-11-13[ruby/reline] Fallback to 256color if COLORTERM != truecolortomoya ishida
(https://github.com/ruby/reline/pull/604) * Fallback to 256color if COLORTERM != truecolor * Add Reline::Face.force_truecolor to force truecolor without COLORTERM env https://github.com/ruby/reline/commit/090e1e4df0
2023-11-13[rubygems/rubygems] Make sure to `require "rubygems"` explicitlyNobuyoshi Nakada
This is also done in bundler/lib/bundler/rubygems_integration.rb, but bundler/lib/bundler.rb loads this file before it. https://github.com/rubygems/rubygems/commit/8840d8507b