summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2023-10-12[ruby/irb] Decouple RubyLex from prompt and line_notomoya ishida
(https://github.com/ruby/irb/pull/701) * Remove instance variable prompt and line_no from RubyLex * Fix prompt test * Rename prompt generating method and make it private https://github.com/ruby/irb/commit/1ceb97fe2e
2023-10-12Fix `dir_config` cache for -include and -lib optionsNobuyoshi Nakada
Set to "--with-" options, not "--without-" keys.
2023-10-12Include default values in `dir_config` cache keysNobuyoshi Nakada
The extconf.rb in mysql2 gem repeats `dir_config('mysql')`, without and with the default path. The third call returns the former results even with the default path. Since it does not check the results of the third call, that `nil` is passed to `find_library` as a path, and fails with `NoMethodError`.
2023-10-11Fix calling exit if irb_context is nilTakashi Kokubun
Trying to avoid a flaky failure like: https://github.com/ruby/ruby/actions/runs/6486918029/job/17616113816
2023-10-11[rubygems/rubygems] Avoid excess Arrays when partitioning ↵Martin Emde
Gem::Version.canonical_segments https://github.com/rubygems/rubygems/commit/338c48f935
2023-10-11[lib/rubygems/path_support.rb] Rephrase commentEllen Marie Dash
Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
2023-10-11[rubygems/rubygems] Move "Defaulting to user installation ..." message, so ↵Ellen Marie Dash
`--install-dir` and `--user-install` can suppress it. https://github.com/rubygems/rubygems/commit/6677fc6853
2023-10-11[rubygems/rubygems] Update incorrect comments.Ellen Marie Dash
https://github.com/rubygems/rubygems/commit/6b21f593f3
2023-10-11[rubygems/rubygems] Simplify logic for Gem::PathSupport#home, and make ↵Ellen Marie Dash
GEM_HOME always overide it. https://github.com/rubygems/rubygems/commit/64273fd7e3
2023-10-11[rubygems/rubygems] Call check_that_user_bin_dir_is_in_path ANY time ↵Ellen Marie Dash
Gem.paths.home == Gem.user_dir. (As opposed to only if `--user-install` is passed.) https://github.com/rubygems/rubygems/commit/0b42d0e869
2023-10-11[rubygems/rubygems] Split out Gem::PathSupport#default_home_dir to fix ↵Ellen Marie Dash
"bundle doctor" specs. https://github.com/rubygems/rubygems/commit/d7f3f901f1
2023-10-11[rubygems/rubygems] Try a different approach for fallback to --user-install.Ellen Marie Dash
https://github.com/rubygems/rubygems/commit/13e0704c40
2023-10-11[rubygems/rubygems] If GEM_HOME exists + isn't writable, use --user-install.Ellen Marie Dash
https://github.com/rubygems/rubygems/commit/6d20585645
2023-10-11[ruby/irb] Rename current completor to RegexpCompletor andtomoya ishida
refactored for future extension (https://github.com/ruby/irb/pull/707) * Move completion implementation to completion/regexp_completor for future extension * Remove constant CompletionProc and PerfectMatchedProc and add a class method * Move document display logic to InputCompletor. Each completor only need to implement `completion_caididates` and `doc_namespace` * Move display_document logic to RelineInputMethod * Use RegexpCompletor directly. Not through class method of InputCompletor. * RegexpCompletor extends BaseCompletor, move back definition to completion.rb * Move display_document test to input_method test * Stop re-initialize completor on each completion phase * Store completor to ReadlineInputMethod's iver https://github.com/ruby/irb/commit/1e98521483
2023-10-11[rubygems/rubygems] Don't delete the release version from pre-release string ↵Martin Emde
more than once https://github.com/rubygems/rubygems/commit/6485adda54
2023-10-11[ruby/irb] Avoid locking the debug UI to a single threadStan Lo
(https://github.com/ruby/irb/pull/725) Since `debug` stores and updates the target thread via its Session's `@tc` variable, we don't need to and shouldn't lock the UI to the thread that activates the integration. https://github.com/ruby/irb/commit/202efdbf0c
2023-10-10Refactor rb_shape_transition_shape_capa to not accept capacityJean Boussier
This way the groth factor is encapsulated, which allows rb_shape_transition_shape_capa to be smarter about ideal sizes.
2023-10-10[rubygems/rubygems] Update bundle-plugin man pageCody Cutrer
The formatting was odd, and it hadn't been updated for how the global source is handled. https://github.com/rubygems/rubygems/commit/bf19a266ab
2023-10-09[rubygems/rubygems] Avoid duplicates -rbundler/setup in RUBYOPT with Ruby ↵Jacopo
preview When using a Ruby preview the require path of `bundler/setup` is similar to `-r/opt/ruby3.3.0-preview2/lib/ruby/3.3.0+0/bundler/setup`. The special character `+` in the string makes the Regexp fail, leading to multiple addition of the same require statement each time `set_rubyopt` is called (e.g. server reloading). Escaping the characters in the string esure a correct match with all the different Ruby versions. https://github.com/rubygems/rubygems/commit/dd43dfa709
2023-10-08[rubygems/rubygems] Reduce allocations when parsing compact indexSamuel Giddins
This still allocates a ton (a string for each line, plus a bunch of splits into arrays), but it helps a bit when Bundler has to go through dependency resolution. ``` ==> memprof.after.txt <== Total allocated: 194.14 MB (2317172 objects) Total retained: 60.81 MB (593164 objects) ==> memprof.before.txt <== Total allocated: 211.97 MB (2404890 objects) Total retained: 62.85 MB (640342 objects) ``` https://github.com/rubygems/rubygems/commit/c68b41b0e5
2023-10-07[rubygems/rubygems] Optimize allocations in Gem::VersionSamuel Giddins
From running in a random rails app I have locally, here are the changes 1) for `bundle lock --update --bundler` (forcing Bundler to go through dependency resolution) ``` ==> memprof.after.txt <== Total allocated: 2.98 MB (48307 objects) Total retained: 1.21 MB (16507 objects) ==> memprof.before.txt <== Total allocated: 12.62 MB (198506 objects) Total retained: 1.30 MB (23133 objects) ``` 2) for `bin/rails runner true` (essentially only bundler/setup) ``` ==> memprof.after.txt <== Total allocated: 59.50 kB (1017 objects) Total retained: 25.08 kB (362 objects) ==> memprof.before.txt <== Total allocated: 561.82 kB (8575 objects) Total retained: 27.28 kB (513 objects) ``` https://github.com/rubygems/rubygems/commit/35c8ed2cb8
2023-10-06[rubygems/rubygems] Update man page for bundle exec to reflect default flag ↵Manu
value `--keep-file-descriptors` is true by default. https://github.com/rubygems/rubygems/commit/b28e88e228
2023-10-06[ruby/prism] Add full_name to ConstantPathNode and ConstantPathTargetNodeVinicius Stock
https://github.com/ruby/prism/commit/b390553028
2023-10-05[ruby/net-http] Net::HTTPResponse nil checkingBrian Hawley
Fix nil handling in read_body and stream_check. Fixes: #70 https://github.com/ruby/net-http/commit/36f916ac18
2023-10-04[ruby/prism] Remove trailing parenthesis in Location#pretty_printgazayas
https://github.com/ruby/prism/commit/8eaa199a28
2023-10-04[ruby/irb] Clear all context usages in RubyLexStan Lo
(https://github.com/ruby/irb/pull/684) After this change, `RubyLex` will not interact with `Context` directly in any way. This decoupling has a few benefits: - It makes `RubyLex` easier to test as it no longer has a dependency on `Context`. We can see this from the removal of `build_context` from `test_ruby_lex.rb`. - It will make `RubyLex` easier to understand as it will not be affected by state changes in `Context` objects. - It allows `RubyLex` to be used in places where `Context` is not available. https://github.com/ruby/irb/commit/d5b262a076
2023-10-03[rubygems/rubygems] Prevent gem activation in standalone modeDaniel Colson
As discussed in https://github.com/rubygems/rubygems/issues/6273#issuecomment-1449176658 The `gem` method behaves awkwardly in standalone mode. Assuming bundler isn't loaded at all, a call to gem might activate a gem that is not part of the bundle (because it's the gem method defined in lib/rubygems/core_ext/kernel_gem.rb and not lib/bundler/rubygems_integration.rb). And when running with `--disable-gems`, the gem method won't be defined at all so we'll get a NoMethodError. Calls to `gem` can appear in dependencies outside an application's control. To work around this at GitHub we defined our own `Kernel#gem` that no-ops. I agree with https://github.com/rubygems/rubygems/issues/6273#issuecomment-1440755882 > people using standalone mode don't want to activate gems like Kernel.gem This commit redefines `Kernel#gem` in the standalone script to no-op. https://github.com/rubygems/rubygems/commit/bea17b55f1
2023-10-03[ruby/reline] Bump version to 0.3.9ima1zumi
(https://github.com/ruby/reline/pull/594) https://github.com/ruby/reline/commit/b6fb72718a
2023-10-03[rubygems/rubygems] Don't re-resolve with prereleases if unlocked gem has no ↵David Rodriguez
prereleases https://github.com/rubygems/rubygems/commit/d76dc70d90
2023-10-03[DOC] Link fixesBurdetteLamar
2023-10-03[rubygems/rubygems] Fix invalid links in documentation. - wrap ENV variables ↵Josef Šimánek
in <code> - fix rubygems.org link - fix zenspider.com link https://github.com/rubygems/rubygems/commit/9eaac94a63
2023-10-03[rubygems/rubygems] 🐛 Specification of branch or ref with tag is ambiguousPeter Boling
- Specs for GitProxy were incorrect and insufficient - Specs are now correct and less insufficient https://github.com/rubygems/rubygems/commit/63d0a8cfd0
2023-10-03[rubygems/rubygems] 🚨 Rubocop LintingPeter Boling
https://github.com/rubygems/rubygems/commit/2851e051c3
2023-10-03[rubygems/rubygems] Fix typo: eglible -> eligible.Josef Šimánek
https://github.com/rubygems/rubygems/commit/1e487e1337
2023-10-03[ruby/csv] [DOC] Fix broken linksBurdette Lamar
(https://github.com/ruby/csv/pull/283) https://github.com/ruby/csv/commit/af64a15b2f
2023-10-03[ruby/csv] Add CSV::InvalidEncodingErrorKosuke Shibata
(https://github.com/ruby/csv/pull/287) To handle encoding errors in CSV parsing with the appropriate error class https://github.com/ruby/csv/commit/68b44887e5
2023-10-03[rubygems/rubygems] Update suggested variable for bindirHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/f9cc6fed25
2023-10-02[ruby/prism] [DOC] Link fixBurdetteLamar
https://github.com/ruby/prism/commit/472bdc4d70
2023-10-02[rubygems/rubygems] Support Ruby's preview version format (Ex: ↵Harshal Bhakta
3.3.0-preview2) in Gemfile https://github.com/rubygems/rubygems/commit/4c1a0511b6
2023-10-02[rubygems/rubygems] Include gemspec in ExtensionTask for native gem tasksGraham Marlow
https://github.com/rubygems/rubygems/commit/042cfb7007
2023-09-30[ruby/open3] [DOC] RDoc for Open3BurdetteLamar
https://github.com/ruby/open3/commit/0aadba9fe6
2023-09-30[ruby/open3] [DOC] RDoc for Open3Burdette Lamar
(https://github.com/ruby/open3/pull/15) https://github.com/ruby/open3/commit/f3191920aa
2023-09-30[rubygems/rubygems] Update SPDX list and warn on deprecated identifiers.Josef Šimánek
https://github.com/rubygems/rubygems/commit/61667028f5
2023-09-29[ruby/open3] [DOC] RDoc for Open3BurdetteLamar
https://github.com/ruby/open3/commit/69f9c49eb4
2023-09-29[ruby/open3] [DOC] RDoc for Open3BurdetteLamar
https://github.com/ruby/open3/commit/f1d6988f13
2023-09-29[ruby/open3] [DOC] RDoc for Open3BurdetteLamar
https://github.com/ruby/open3/commit/a4d9fb99de
2023-09-29[ruby/open3] [DOC] RDoc for Open3BurdetteLamar
https://github.com/ruby/open3/commit/8c06964d12
2023-09-29[ruby/prism] Add a logoKevin Newton
https://github.com/ruby/prism/commit/d87607b874
2023-09-29[ruby/prism] Bump versionKevin Newton
https://github.com/ruby/prism/commit/3e44415ca2
2023-09-29[rubygems/rubygems] Handled unknown gems in bundled gems warningJean Boussier
We have this code that started failing on 3.3.0-dev recently: ``` irb(main):002> require File.join(RbConfig::CONFIG["rubylibdir"], "observer.rb") /opt/rubies/3.3.0-dev-09-29/lib/ruby/3.3.0+0/bundled_gems.rb:86:in `<': comparison of String with nil failed (ArgumentError) end + " which #{RUBY_VERSION < SINCE[gem] ? "will be" : "is"} not part of the default gems since Ruby #{SINCE[gem]}" ^^^^^^^^^^ from /opt/rubies/3.3.0-dev-09-29/lib/ruby/3.3.0+0/bundled_gems.rb:86:in `warning?' from /opt/rubies/3.3.0-dev-09-29/lib/ruby/3.3.0+0/bundled_gems.rb:92:in `block in <module:BUNDLED_GEMS>' from <internal:/opt/rubies/3.3.0-dev-09-29/lib/ruby/3.3.0+0/rubygems/core_ext/kernel_require.rb>:42:in `block in require' from <internal:/opt/rubies/3.3.0-dev-09-29/lib/ruby/3.3.0+0/rubygems/core_ext/kernel_require.rb>:39:in `synchronize' from <internal:/opt/rubies/3.3.0-dev-09-29/lib/ruby/3.3.0+0/rubygems/core_ext/kernel_require.rb>:39:in `require' from (irb):2:in `<main>' from <internal:kernel>:187:in `loop' from /opt/rubies/3.3.0-dev-09-29/lib/ruby/gems/3.3.0+0/gems/irb-1.8.1/exe/irb:9:in `<top (required)>' from /Users/byroot/.gem/ruby/3.3.0/bin/irb:25:in `load' from /Users/byroot/.gem/ruby/3.3.0/bin/irb:25:in `<main>' ``` https://github.com/rubygems/rubygems/commit/d67eddb295