summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2024-10-23[rubygems/rubygems] Add another bail-early condition to ↵Ellen Marie Dash
suggest_gems_from_name(), with test. https://github.com/rubygems/rubygems/commit/7bb7c0ac2d
2024-10-23[rubygems/rubygems] Optimize when suggest_gems_from_name finds an exact match.Ellen Marie Dash
https://github.com/rubygems/rubygems/commit/6c67298584
2024-10-23[rubygems/rubygems] Document suggest_gems_from_name()Ellen Marie Dash
https://github.com/rubygems/rubygems/commit/8f9983cc21
2024-10-23[rubygems/rubygems] [suggest_gems_from_name] Bail early if the value is ↵Ellen Marie Dash
guaranteed to be rejected. https://github.com/rubygems/rubygems/commit/56262a9384
2024-10-23[rubygems/rubygems] Print a proper error when there's a previous empty ↵David Rodríguez
installation path with bad permissions https://github.com/rubygems/rubygems/commit/07e7f0bf5e
2024-10-23[rubygems/rubygems] Improve Bundler errors when trying to install to a ↵David Rodríguez
protected folder in macOS ### Before ``` $ GEM_HOME=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/ bundle Fetching gem metadata from https://rubygems.org/. Source rubygems repository https://rubygems.org/ or installed locally is ignoring #<Bundler::StubSpecification name=sqlite3 version=1.3.13 platform=ruby> because it is missing extensions Source rubygems repository https://rubygems.org/ or installed locally is ignoring #<Bundler::StubSpecification name=nokogiri version=1.13.8 platform=ruby> because it is missing extensions Source rubygems repository https://rubygems.org/ or installed locally is ignoring #<Bundler::StubSpecification name=libxml-ruby version=3.2.1 platform=ruby> because it is missing extensions Resolving dependencies... Fetching ruby2_keywords 0.0.5 Retrying download gem from https://rubygems.org/ due to error (2/4): Bundler::GenericSystemCallError There was an error accessing `/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/cache/ruby2_keywords-0.0.5.gem`. The underlying system error is Errno::EPERM: Operation not permitted @ rb_sysopen - /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/cache/ruby2_keywords-0.0.5.gem Retrying download gem from https://rubygems.org/ due to error (3/4): Bundler::GenericSystemCallError There was an error accessing `/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/cache/ruby2_keywords-0.0.5.gem`. The underlying system error is Errno::EPERM: Operation not permitted @ rb_sysopen - /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/cache/ruby2_keywords-0.0.5.gem Retrying download gem from https://rubygems.org/ due to error (4/4): Bundler::GenericSystemCallError There was an error accessing `/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/cache/ruby2_keywords-0.0.5.gem`. The underlying system error is Errno::EPERM: Operation not permitted @ rb_sysopen - /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/cache/ruby2_keywords-0.0.5.gem Bundler::GenericSystemCallError: There was an error accessing `/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/cache/ruby2_keywords-0.0.5.gem`. The underlying system error is Errno::EPERM: Operation not permitted @ rb_sysopen - /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/cache/ruby2_keywords-0.0.5.gem /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/shared_helpers.rb:119:in `rescue in filesystem_access' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/shared_helpers.rb:104:in `filesystem_access' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/rubygems_integration.rb:431:in `block in download_gem' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/retry.rb:40:in `run' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/retry.rb:30:in `attempt' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/rubygems_integration.rb:423:in `download_gem' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/source/rubygems.rb:479:in `download_gem' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/source/rubygems.rb:436:in `fetch_gem' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/source/rubygems.rb:420:in `fetch_gem_if_possible' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/source/rubygems.rb:162:in `install' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/installer/gem_installer.rb:55:in `install' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/installer/gem_installer.rb:17:in `install_from_spec' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/installer/parallel_installer.rb:133:in `do_install' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/installer/parallel_installer.rb:124:in `block in worker_pool' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/worker.rb:62:in `apply_func' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/worker.rb:57:in `block in process_queue' <internal:kernel>:187:in `loop' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/worker.rb:54:in `process_queue' /Users/deivid/code/rubygems/rubygems/bundler/lib/bundler/worker.rb:90:in `block (2 levels) in create_threads' An error occurred while installing ruby2_keywords (0.0.5), and Bundler cannot continue. In Gemfile: ruby2_keywords ``` ### After ``` $ GEM_HOME=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/ bundle There was an error creating `/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/bundler.lock`. The underlying system error is Errno::EPERM: Operation not permitted @ rb_sysopen - /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/bundler.lock ``` https://github.com/rubygems/rubygems/commit/345ec45f5a
2024-10-23[rubygems/rubygems] Improve `Bundler::GenericSystemCall` error messageDavid Rodríguez
https://github.com/rubygems/rubygems/commit/ccd7e084a8
2024-10-23[rubygems/rubygems] Consistently use `:create` action when creating directoriesDavid Rodríguez
It gives better errors. https://github.com/rubygems/rubygems/commit/bedae080ef
2024-10-23[rubygems/rubygems] Fix running `bundler` (with a final `r`) in a `bundle ↵David Rodríguez
exec` context https://github.com/rubygems/rubygems/commit/ad95a1dfaa
2024-10-23[rubygems/rubygems] Do what the comment says, it's simplerDavid Rodríguez
https://github.com/rubygems/rubygems/commit/0511d2c08d
2024-10-23[rubygems/rubygems] Remove the need for some bundler monkeypatchesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/f530f8686d
2024-10-23Clarify bundler inline’s `install` parameterJerome Dalbert
2024-10-23[ruby/ipaddr] Drop support for Ruby 2.3Taketo Takashima
https://github.com/ruby/ipaddr/commit/4685fca13d
2024-10-23[ruby/error_highlight] Adjust truncation, add opt-out mechanism, rename ↵Guilherme Carreiro
methods, and prepare error highlighting to render on extremely small screens https://github.com/ruby/error_highlight/commit/c565340958
2024-10-23[ruby/error_highlight] Handle very long lines with errors in the middle of ↵Guilherme Carreiro
the line https://github.com/ruby/error_highlight/commit/0657bc1afa
2024-10-23[ruby/error_highlight] Handle very long linesGuilherme Carreiro
https://github.com/ruby/error_highlight/commit/383490a4b4
2024-10-22[rubygems/rubygems] Remove patches for old TruffleRuby versionsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/264c61eb8e
2024-10-22[ruby/reline] Use IO's encoding instead of Encoding.default_externalWu
(https://github.com/ruby/reline/pull/765) * use IO's encoding * refactoring * remove unused encoding params * (for retriggering CI) remove unused encoding params https://github.com/ruby/reline/commit/f09772adab
2024-10-22Perform an actual access check in Dir.tmpdir for writabilityKJ Tsanaktsidis
At the moment, this code is looking at the stat output to determine if a temp directory can be written to. However, just because the stat bits say that a directory is writable, does not make it so; and, likewise, the operating system may in fact grant access to paths that the stat bits and process UID say should be inaccessible. These systems include: * Posix ACL's * Linux's capabilities like CAP_DAC_OVERRIDE * Linux Security Modules like SELinux or AppArmor * Syscall filters like Linux's seccomp * Granular capability systems like FreeBSD's Capsicum * OpenBSD's pledge and unveil * Windows too has a rich ACL system for controlling filesystem access The best thing to do is simply to try and access the path with `File.writable?` and let the operating system tell us if the path can be accessed. Notes: Merged: https://github.com/ruby/ruby/pull/11403
2024-10-19[ruby/ipaddr] Bump the version to 1.2.7Akinori MUSHA
https://github.com/ruby/ipaddr/commit/b44d2a1173
2024-10-19[ruby/ipaddr] Use string interpolation instead of format()Akinori MUSHA
https://github.com/ruby/ipaddr/commit/1f41cd7320
2024-10-18[ruby/irb] Suppress "literal string will be frozen in the future"Tsutomu Katsube
warning (https://github.com/ruby/irb/pull/1019) * Suppress "literal string will be frozen in the future" warning Before change: ```console $ ruby -W -I lib -e 'require "irb"; IRB.setup(nil); IRB::Irb.new.build_statement("1 + 2")' /Users/zzz/src/github.com/ruby/irb/lib/irb.rb:1135: warning: literal string will be frozen in the future ``` After change: ```console $ ruby -W -I lib -e 'require "irb"; IRB.setup(nil); IRB::Irb.new.build_statement("1 + 2")' ``` * Making build_statement not modify the given argument Because improves readability and code quality. Co-authored-by: tomoya ishida <tomoyapenguin@gmail.com> --------- https://github.com/ruby/irb/commit/3da04b9786 Co-authored-by: tomoya ishida <tomoyapenguin@gmail.com>
2024-10-18[ruby/irb] Always use alternate sceen on alt-dtomoya ishida
(https://github.com/ruby/irb/pull/988) https://github.com/ruby/irb/commit/db0a923d62
2024-10-18[rubygems/rubygems] Add `bundle add --quiet` optionJerome Dalbert
This option is similar to the `bundle install --quiet` option https://github.com/rubygems/rubygems/commit/3bd773d827
2024-10-18[ruby/ipaddr] Use string interpolation instead of format()Akinori MUSHA
https://github.com/ruby/ipaddr/commit/73f59e111f
2024-10-18[ruby/ipaddr] Added to_json/as_json methodTaketo Takashima
Updated to use cidr method when return address with prefix in #as_json https://github.com/ruby/ipaddr/commit/cf8181d53e
2024-10-18[rubygems/rubygems] Clarify `bundle install --quiet` documentationJerome Dalbert
Bundler always exits with a status code. https://github.com/rubygems/rubygems/commit/3a38bd0b12
2024-10-18[ruby/syntax_suggest] Bump up 2.0.1Hiroshi SHIBATA
https://github.com/ruby/syntax_suggest/commit/0b9e4081c0
2024-10-18[ruby/syntax_suggest] Removed empty commentHiroshi SHIBATA
https://github.com/ruby/syntax_suggest/commit/e1d9c83736
2024-10-17[ruby/rdoc] feature: Render mixed-in methods and constants withMike Dalessio
`--embed-mixins` (https://github.com/ruby/rdoc/pull/842) * Embed mixed-in methods and constants with `--embed-mixins` When `--embed-mixins` option is set: - methods from an `extend`ed module are documented as singleton methods - attrs from an `extend`ed module are documented as class attributes - methods from an `include`ed module are documented as instance methods - attrs from an `include`ed module are documented as instance attributes - constants from an `include`ed module are documented Sections are created when needed, and Darkfish's template annotates each of these mixed-in CodeObjects. We also respect the mixin methods' visibility. This feature is inspired by Yard's option of the same name. * Add comment to document why we set object visibility Co-authored-by: Stan Lo <stan001212@gmail.com> * Add the mixin_from attribute to CodeObject's initializer * Add test coverage for private mixed-in attributes. --------- https://github.com/ruby/rdoc/commit/481c2ce660 Co-authored-by: Stan Lo <stan001212@gmail.com>
2024-10-17Optimize Ext::Generator::State#configureJean Boussier
If we assume that most of the time the `opts` hash is small it's faster to go over the provided keys with a `case` than to test all possible keys one by one. Before: ``` == Encoding small nested array (121 bytes) ruby 3.4.0preview2 (2024-10-07 master 32c733f57b) +YJIT +PRISM [arm64-darwin23] Warming up -------------------------------------- json 156.832k i/100ms oj 209.769k i/100ms rapidjson 162.922k i/100ms Calculating ------------------------------------- json 1.599M (± 2.5%) i/s (625.34 ns/i) - 7.998M in 5.005110s oj 2.137M (± 1.5%) i/s (467.99 ns/i) - 10.698M in 5.007806s rapidjson 1.677M (± 3.5%) i/s (596.31 ns/i) - 8.472M in 5.059515s Comparison: json: 1599141.2 i/s oj: 2136785.3 i/s - 1.34x faster rapidjson: 1676977.2 i/s - same-ish: difference falls within error == Encoding small hash (65 bytes) ruby 3.4.0preview2 (2024-10-07 master 32c733f57b) +YJIT +PRISM [arm64-darwin23] Warming up -------------------------------------- json 216.464k i/100ms oj 661.328k i/100ms rapidjson 324.434k i/100ms Calculating ------------------------------------- json 2.301M (± 1.7%) i/s (434.57 ns/i) - 11.689M in 5.081278s oj 7.244M (± 1.2%) i/s (138.05 ns/i) - 36.373M in 5.021985s rapidjson 3.323M (± 2.9%) i/s (300.96 ns/i) - 16.871M in 5.081696s Comparison: json: 2301142.2 i/s oj: 7243770.3 i/s - 3.15x faster rapidjson: 3322673.0 i/s - 1.44x faster ``` After: ``` == Encoding small nested array (121 bytes) ruby 3.4.0preview2 (2024-10-07 master 32c733f57b) +YJIT +PRISM [arm64-darwin23] Warming up -------------------------------------- json 168.087k i/100ms oj 208.872k i/100ms rapidjson 149.909k i/100ms Calculating ------------------------------------- json 1.761M (± 1.1%) i/s (567.90 ns/i) - 8.909M in 5.059794s oj 2.144M (± 0.9%) i/s (466.37 ns/i) - 10.861M in 5.065903s rapidjson 1.692M (± 1.7%) i/s (591.04 ns/i) - 8.545M in 5.051808s Comparison: json: 1760868.2 i/s oj: 2144205.9 i/s - 1.22x faster rapidjson: 1691941.1 i/s - 1.04x slower == Encoding small hash (65 bytes) ruby 3.4.0preview2 (2024-10-07 master 32c733f57b) +YJIT +PRISM [arm64-darwin23] Warming up -------------------------------------- json 242.957k i/100ms oj 675.217k i/100ms rapidjson 355.040k i/100ms Calculating ------------------------------------- json 2.569M (± 1.5%) i/s (389.22 ns/i) - 12.877M in 5.013095s oj 7.128M (± 2.3%) i/s (140.30 ns/i) - 35.787M in 5.023594s rapidjson 3.656M (± 3.1%) i/s (273.50 ns/i) - 18.462M in 5.054558s Comparison: json: 2569217.5 i/s oj: 7127705.6 i/s - 2.77x faster rapidjson: 3656285.0 i/s - 1.42x faster ```
2024-10-17[ruby/json] Convert Generator initialize and configure method into RubyJean Boussier
This helps very marginally with allocation speed. https://github.com/ruby/json/commit/25db79dfaa
2024-10-17[ruby/rdoc] Use scroll-margin-top on anchor targetsStan Lo
(https://github.com/ruby/rdoc/pull/1190) This will make the anchor target easier to read. https://github.com/ruby/rdoc/commit/e2fe4882f4
2024-10-17[ruby/rdoc] Add scroll-margin-top on all :target elementsMads Ohm Larsen
(https://github.com/ruby/rdoc/pull/1174) https://github.com/ruby/rdoc/commit/7398e5b0ad Co-authored-by: Stan Lo <stan001212@gmail.com>
2024-10-17[rubygems/rubygems] Allow using `gemspec` DSL twice with same dependency and ↵David Rodríguez
compatible requirements https://github.com/rubygems/rubygems/commit/a8d14c1fc2
2024-10-16[rubygems/rubygems] Fix `bundle check` sometimes locking gems under the ↵David Rodríguez
wrong source https://github.com/rubygems/rubygems/commit/1e5780db0a Co-authored-by: Taylor Thurlow <thurlow@hey.com>
2024-10-16[rubygems/rubygems] Delay and refactor verification of changed sourcesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/d5dce93167
2024-10-16[rubygems/rubygems] No reason for `Definition#sources` to be privateDavid Rodríguez
https://github.com/rubygems/rubygems/commit/432fe083a6
2024-10-16[rubygems/rubygems] Lock definition directlyDavid Rodríguez
https://github.com/rubygems/rubygems/commit/55eb6630a8
2024-10-16[rubygems/rubygems] Add missing comma in documentationLeo Arnold
https://github.com/rubygems/rubygems/commit/fe9999f2cf
2024-10-16[ruby/prism] RelocationKevin Newton
https://github.com/ruby/prism/commit/5ea6042408
2024-10-16[ruby/yaml] Support old version of PsychHiroshi SHIBATA
https://github.com/ruby/yaml/commit/5b39653c52
2024-10-16[ruby/yaml] Also use safe_load on YAML::StoreHiroshi SHIBATA
https://github.com/ruby/yaml/commit/09691d005f
2024-10-16[ruby/yaml] Make YAML::DBM optionalHiroshi SHIBATA
https://github.com/ruby/yaml/commit/f7c44d3fd7
2024-10-16[ruby/yaml] Also use safe_load with each_value, values and shiftHiroshi SHIBATA
https://github.com/ruby/yaml/commit/f47d6123eb
2024-10-16[ruby/yaml] Prefer to use YAML.safe_loadHiroshi SHIBATA
https://github.com/ruby/yaml/commit/c3d0f64224
2024-10-16[ruby/yaml] Removed confused VERSION constant for YAML::DBMHiroshi SHIBATA
https://github.com/ruby/yaml/commit/952fd361b1
2024-10-15[ruby/rdoc] Generate meta tags based on page's contentVinicius Stock
(https://github.com/ruby/rdoc/pull/1091) https://github.com/ruby/rdoc/commit/716bc16a7d
2024-10-14[rubygems/rubygems] Prevent some test suite warnings about missing extensionsDavid Rodríguez
We fixed some issues recently where Bundler would try to activate a pysch spec with missing extensions and crash. However, as a side effect, we started printing warnings about missing extensions in situations where we did not warn before. It may be interesting to warn on these new situations too, but in order to minimize changes for now, I'm reverting to printing warnings in the same situations as before. https://github.com/rubygems/rubygems/commit/51ebff6982
2024-10-14[rubygems/rubygems] Fix `gem contents` for default gemsDavid Rodríguez
A default gem does not always live in the same place. For example, Bundler may be installed to `site_dir` when RubyGems have been upgraded. A more reliable way seems to actually activate the default gem, so that we can know for sure where it lives. https://github.com/rubygems/rubygems/commit/c69f6dfb18