summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2024-05-13[rubygems/rubygems] Don't load `SharedHelpers` unnecessarilyDavid Rodriguez
https://github.com/rubygems/rubygems/commit/de4650f629
2024-05-13[rubygems/rubygems] Don't depend on Pathname unnecessarilyDavid Rodriguez
https://github.com/rubygems/rubygems/commit/8c8aaecc48
2024-05-13[ruby/prism] Rescue LoadError for ruby_parser as wellKevin Newton
https://github.com/ruby/prism/commit/d4eb13e703
2024-05-13[ruby/prism] Add error handling for missing `parser` gem in `Prism::Translation`Koichi ITO
Resolves https://github.com/ruby/prism/pull/2803. This PR adds error handling for missing `parser` gem in `Prism::Translation`. The `parser` gem is a required runtime dependency when using `Prism::Translation::Parser`. But it is not required for other uses of Prism. To avoid unnecessary dependencies, it is not added as a `runtime_dependency` in the prism.gemspec. Instead, if the dependency is missing, instructions are given to add it to Gemfile. ## Before ```console $ bundle exec ruby -e 'require "prism"; require "prism/translation/parser33"' /Users/koic/.rbenv/versions/3.3.1/lib/ruby/3.3.0/bundled_gems.rb:74:in `require': cannot load such file -- parser (LoadError) from /Users/koic/.rbenv/versions/3.3.1/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require' from /Users/koic/src/github.com/ruby/prism/lib/prism/translation/parser.rb:3:in `<top (required)>' from /Users/koic/.rbenv/versions/3.3.1/lib/ruby/3.3.0/bundled_gems.rb:74:in `require' from /Users/koic/.rbenv/versions/3.3.1/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require' from /Users/koic/src/github.com/ruby/prism/lib/prism/translation/parser33.rb:6:in `<module:Translation>' from /Users/koic/src/github.com/ruby/prism/lib/prism/translation/parser33.rb:4:in `<module:Prism>' from /Users/koic/src/github.com/ruby/prism/lib/prism/translation/parser33.rb:3:in `<top (required)>' from /Users/koic/.rbenv/versions/3.3.1/lib/ruby/3.3.0/bundled_gems.rb:74:in `require' from /Users/koic/.rbenv/versions/3.3.1/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require' from -e:1:in `<main>' ``` ## After ```console $ bundle exec ruby -e 'require "prism"; require "prism/translation/parser33"' Error: Unable to load parser. Add `gem "parser"` to your Gemfile. ``` https://github.com/ruby/prism/commit/4880aec22d
2024-05-13[ruby/prism] Autoload newlines and comment visitorsKevin Newton
Having the @newline instance variable in every node adds up, and since it is so rarely used, we only want to add it when necessary. Moving this into an autoloaded file and moving the instance variable out of the default initializers reduces allocated memory because the nodes are now smaller and some fit into the compact list. On my machine, I'm seeing about an 8% drop. https://github.com/ruby/prism/commit/eea92c07d2
2024-05-13[rubygems/rubygems] Use a constant empty tar header to avoid extra allocationsSamuel Giddins
https://github.com/rubygems/rubygems/commit/716666f65f
2024-05-13[rubygems/rubygems] Use spec.base_dir to remove pluginsVít Ondruch
The plugin loader from `@gem_home` was removed during uninstallation. However, this could leave behind the plugins for `--user-install` installed gems. Use `Gem::Specifictaions#base_dir` instead. This ensures that the plugin loader for associated .gemspec is uninstalled. https://github.com/rubygems/rubygems/commit/6047f78210
2024-05-13[rubygems/rubygems] Fix error when Bundler installation is corruptedDavid Rodriguez
If one upgrades the default copy of Bundler through `gem update --system`, and then reinstalls Ruby without removing the previous copy. Then the new installation will have a correct default bundler gemspec, but a higher copy installed in site_dir. This causes a crash when running Bundler and prints the bug report template. This could probably be fixed in Ruby install script, by removing any previous Bundler default copies, but if the problem is already there, I think it's best to print a proper user error. https://github.com/rubygems/rubygems/commit/ada6de765d
2024-05-13[rubygems/rubygems] Avoid standard requires while loading shared helpersDavid Rodriguez
We should make sure Bundler does not trigger RubyGems require logic for gem activation until it had the chance to register its own monkeypatches to RubyGems. https://github.com/rubygems/rubygems/commit/fbd2ff86b9
2024-05-13[rubygems/rubygems] Require things right before they're neededDavid Rodriguez
https://github.com/rubygems/rubygems/commit/07022e3f2f
2024-05-10[ruby/reline] Avoid STDIN.winsize called in `require "reline"`tomoya ishida
(https://github.com/ruby/reline/pull/703) https://github.com/ruby/reline/commit/21891c47c4
2024-05-10[PRISM] Bump to version 0.29.0Kevin Newton
2024-05-10[ruby/prism] operator renameKevin Newton
https://github.com/ruby/prism/commit/b5e47f5c42
2024-05-10[ruby/prism] Fix tapioca require orderKevin Newton
https://github.com/ruby/prism/commit/15bf727881
2024-05-10[ruby/prism] Fix RBS outside of prismKevin Newton
https://github.com/ruby/prism/commit/ee73ad757f
2024-05-10[ruby/prism] Prism::CallNode#full_message_locKevin Newton
https://github.com/ruby/prism/commit/fa6fe9be84
2024-05-10[ruby/irb] Add a new initialization step to validate IRB.conf'sStan Lo
values (https://github.com/ruby/irb/pull/953) Currently, users can only find out that they have set a wrong value for IRB configs when the value is used, with opaque error messages like "comparison of Integer with true failed (TypeError)". This commit adds a new initialization step to validate the values of some IRB configs, so that users can find out about the wrong values during the initialization of IRB. https://github.com/ruby/irb/commit/af8ef2948b
2024-05-10[ruby/irb] Simplify regexp to account for prism error messagesKevin Newton
(https://github.com/ruby/irb/pull/954) https://github.com/ruby/irb/commit/e0c29be074 Co-authored-by: Stan Lo <stan001212@gmail.com>
2024-05-09[ruby/reline] Bump version to 0.5.6Mari Imaizumi
(https://github.com/ruby/reline/pull/700) https://github.com/ruby/reline/commit/1b6c29a2b1
2024-05-09Mark rdoc as bundled gems at Ruby 3.5Hiroshi SHIBATA
2024-05-08[rubygems/rubygems] Monthly man update for May 2024.Josef Šimánek
https://github.com/rubygems/rubygems/commit/9ee7069841
2024-05-08[ruby/reline] Implement bracketed paste inserttomoya ishida
(https://github.com/ruby/reline/pull/655) https://github.com/ruby/reline/commit/e92dcbf514
2024-05-08[PRISM] Sync prism version bumpKevin Newton
2024-05-07[rubygems/rubygems] Accept WASI as an OS name in Gem::PlatformYuta Saito
https://github.com/rubygems/rubygems/commit/1209d3c6b0
2024-05-06[rubygems/rubygems] Remove unnecessary compatibility codeDavid Rodriguez
https://github.com/rubygems/rubygems/commit/160a515412
2024-05-05[ruby/did_you_mean] Move development dependencies to GemfileNobuyoshi Nakada
https://github.com/ruby/did_you_mean/commit/24c06dd509
2024-05-05[ruby/irb] Bump version to v1.13.1Stan Lo
(https://github.com/ruby/irb/pull/951) https://github.com/ruby/irb/commit/66318d0a34
2024-05-05[ruby/irb] Clarify that the context is IRB contextStan Lo
(https://github.com/ruby/irb/pull/950) https://github.com/ruby/irb/commit/8cde57f55a
2024-05-05[ruby/reline] Remove not implemented variablesMari Imaizumi
(https://github.com/ruby/reline/pull/699) https://github.com/ruby/reline/commit/328699e901
2024-05-05[ruby/reline] Add name defined in readline to completion keytomoya ishida
bindings C-i C-p C-n (https://github.com/ruby/reline/pull/698) https://github.com/ruby/reline/commit/1314787bbb
2024-05-04[ruby/prism] Use `version: 3.3.1` against `Translation::Parser`Koichi ITO
Follow up https://github.com/ruby/prism/pull/2760. This PR updates the `Translation::Parser` to use version 3.3.1 when the version 3.3 is specified. The Parser gem is structured to support the latest patch versions, hence this aligns with Parser-compatible versioning. As noted in https://github.com/ruby/prism/pull/2760, the behavior remains unchanged with this switch from 3.3.0 to 3.3.1. https://github.com/ruby/prism/commit/efde09d318
2024-05-04[ruby/irb] Change debug test workaround only enabled when output istomoya ishida
tty (https://github.com/ruby/irb/pull/949) https://github.com/ruby/irb/commit/3f231b8622
2024-05-04[ruby/irb] Improve help message for no meta commandsStan Lo
(https://github.com/ruby/irb/pull/948) * Remove unnecessary code from command tests * Improve help message for no meta commands 1. Add placeholder values for both command category and description 2. Update help command's output to give different types of categories more explicit ordering https://github.com/ruby/irb/commit/b1ef58aeff
2024-05-04[ruby/irb] Use flag instead of caller for `debug`'s binding.irbStan Lo
check (https://github.com/ruby/irb/pull/947) https://github.com/ruby/irb/commit/4a4d7a4279
2024-05-03[ruby/irb] Avoid raising errors while running help for customKenichi Kamiya
commands (https://github.com/ruby/irb/pull/944) * Avoid raising errors while running help for custom commands Raising an error from the help command is not a pleasure for the end user, even if the command does not define any attributes * Update test/irb/command/test_custom_command.rb --------- https://github.com/ruby/irb/commit/c8bba9f8dc Co-authored-by: Stan Lo <stan001212@gmail.com>
2024-05-03[ruby/prism] Prism::Location#adjoinKevin Newton
https://github.com/ruby/prism/commit/a298db68e3
2024-05-03[ruby/prism] Prism::Node#tunnelKevin Newton
https://github.com/ruby/prism/commit/0bf5d651da
2024-05-03[ruby/prism] Create specialized `ASCIISource` with asciionly optimizationsVinicius Stock
https://github.com/ruby/prism/commit/40993166a8
2024-05-03[ruby/prism] Remove deprecated #child usageKevin Newton
https://github.com/ruby/prism/commit/14d9b431e2
2024-05-03[rubygems/rubygems] Remove `Gem::Specification#mark_version`David Rodriguez
This gets in the middle if we ever start allowing to build as if using a different RubyGems version than the one being run. This could be useful to make `gem rebuild` a little more usable, and it's already done by Bundler specs which already make this method a noop when they need this. I'm not sure forcefully setting this, even if user explicitly specified something else is helpful. Since this could potentially prevent gems explicitly setting a constant RubyGems version from building, I changed the error of incorrect RubyGems version from a hard error to a warning, since it will start happening in those cases if we stop overwriting the version. https://github.com/rubygems/rubygems/commit/45676af80d
2024-05-03[ruby/prism] Change ConstantPathNode#child to ConstantPathNode#{name,name_loc}Kevin Newton
This has been requested for a long time, and I'm finally doing it now. Unfortunately this is a breaking change for all of the APIs. I've added in a Ruby method for `#child` that is deprecated so that existing usage doesn't break, but for everyone else this is going to be a bit of a pain. https://github.com/ruby/prism/commit/9cbe74464e
2024-05-03[ruby/prism] Assume eval context for ruby_parser and ripperKevin Newton
https://github.com/ruby/prism/commit/e4d6984892
2024-05-03[ruby/prism] Assume an eval context for `Prism::Translation::Parser`Earlopain
This is similar to https://github.com/davidwessman/syntax_tree-erb/issues/81 but for RuboCop The parser gem doesn't support these types of checks, see https://github.com/whitequark/parser?tab=readme-ov-file#syntax-check-of-block-exits While this is technically a bug in the parser gem, it does increase compatibility and allows prism to be used when linting erb or haml with a RuboCop extension. https://github.com/ruby/prism/commit/6c59ae6a00
2024-05-03[ruby/prism] Remove generics from sorbet typesKevin Newton
https://github.com/ruby/prism/commit/080d84fd03
2024-05-03[rubygems/rubygems] Rename credential email to identifier in WebAuthn pollerJenny Shen
https://github.com/rubygems/rubygems/commit/5e3e55f8bc
2024-05-02Sync IRB 241e061Stan Lo
2024-05-02[ruby/reline] Bump version to 0.5.5Mari Imaizumi
(https://github.com/ruby/reline/pull/696) https://github.com/ruby/reline/commit/8bf71d0b81
2024-05-02[ruby/irb] Add workaround for ruby/debug/test/console/irb_testtomoya ishida
failing with StdioInputMethod (https://github.com/ruby/irb/pull/943) https://github.com/ruby/irb/commit/acf3c1816e
2024-05-02[ruby/prism] Node#script_lines and supporting infraKevin Newton
https://github.com/ruby/prism/commit/cb4a8ab772
2024-05-02[ruby/reline] Fix default and additional key bindings vanish bugtomoya ishida
(https://github.com/ruby/reline/pull/697) https://github.com/ruby/reline/commit/fc9b4d2274