summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2024-04-19[rubygems/rubygems] Keep backword compatibility of Bundler.requireHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/f6f79f4c37
2024-04-19[rubygems/rubygems] Removed needless class nameHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/a2f43d3756
2024-04-19[rubygems/rubygems] Track HEAD changes for old PR proposalHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/e3d180620c
2024-04-19[rubygems/rubygems] Removed redundant beginHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/a9d22e5f46
2024-04-19[rubygems/rubygems] Add plugin hooks for Bundler.requirefatkodima
https://github.com/rubygems/rubygems/commit/b373b7ed0d
2024-04-18[ruby/prism] Bump to v0.26.0Kevin Newton
https://github.com/ruby/prism/commit/eadb09ef36
2024-04-18[ruby/prism] "Fix" transpose issue in parser compilerKevin Newton
https://github.com/ruby/prism/commit/593d637178
2024-04-18chore: remove repetitive words (#10573)careworry
Signed-off-by: careworry <worrycare@outlook.com>
2024-04-18[ruby/irb] Fix % escape in prompt formattomoya ishida
(https://github.com/ruby/irb/pull/927) https://github.com/ruby/irb/commit/08eee25d28
2024-04-18[ruby/irb] Prompt specifiers documentation improvementsLorenzo Zabot
(https://github.com/ruby/irb/pull/926) https://github.com/ruby/irb/commit/e8ea8f253d
2024-04-18[rubygems/rubygems] Never write credentials to lockfilesDavid Rodriguez
https://github.com/rubygems/rubygems/commit/e8a363713e
2024-04-18[ruby/reline] Remove unused variableKenichi Kamiya
(https://github.com/ruby/reline/pull/684) https://github.com/ruby/reline/commit/ce30c23730
2024-04-18[ruby/optparse] Fix typo [ci skip]Nobuyoshi Nakada
https://github.com/ruby/optparse/commit/0aec9adfc5
2024-04-18[ruby/optparse] [DOC] Package files for RDocNobuyoshi Nakada
https://github.com/ruby/optparse/commit/b49cb996af
2024-04-18[ruby/ipaddr] Add IPAddr.cidr to return ip address in cidr notationBen Fritsch
https://github.com/ruby/ipaddr/commit/f5b006741f
2024-04-17add #2709’s new RBIs to `.gemspec`ParadoxV5
2024-04-17[ruby/irb] Remove internal-only methods from Command::Basetomoya ishida
(https://github.com/ruby/irb/pull/922) * Remove internal-only methods from Command::Base Command#ruby_args and Command#unwrap_string_literal are used for default command's argument backward compatibility. Moved these methods to another module to avoid being used from custom commands. * Update lib/irb/command/edit.rb --------- https://github.com/ruby/irb/commit/7405a841e8 Co-authored-by: Stan Lo <stan001212@gmail.com>
2024-04-17[rubygems/rubygems] Excluding local platform from lockfile should not affect ↵Mike Dalessio
musl vs gnu case This case is for not locking things like `arm-darwin-23` when the lockfile already includes `arm-darwin`, so that we don't infinitely keep redundant versioned platforms in the lockfile when not necessary. We detect this with `Gem::Platform#===`. For example, `Gem::Platform.new("arm-darwin-23") === Gem::Platform.new("arm-darwin")` but they're not `==`. However, in the case of `-musl` vs `-gnu`, those act as the platform "version", but `===` is not commutative for them. This is explained in `===` docs. We only want to exclude the local platform in situations when `Gem::Platform#===` is actually commutative. https://github.com/rubygems/rubygems/commit/8099c4face
2024-04-17[ruby/prism] Add a reflection API for determining the fields of a nodeKevin Newton
https://github.com/ruby/prism/commit/f3f9950a74
2024-04-17[ruby/reline] Refactor nomultiline and multiline mode differencetomoya ishida
(https://github.com/ruby/reline/pull/653) * Support multiline input in Reline.readline internally, reduce multiline-singleline branch * Add readline(singleline) prompt test with force inserting multiline text https://github.com/ruby/reline/commit/97846095d7
2024-04-17[ruby/prism] Inline pm_state_stackKevin Newton
2024-04-17[Feature #20335] `Thread.each_caller_location` argumentsNobuyoshi Nakada
Accecpt the same arguments as `caller` and `caller_locations`.
2024-04-16[ruby/reline] Refactor history move and history searchtomoya ishida
(https://github.com/ruby/reline/pull/651) https://github.com/ruby/reline/commit/90e43e01d4
2024-04-16[ruby/reline] Bump version to 0.5.2Mari Imaizumi
(https://github.com/ruby/reline/pull/682) https://github.com/ruby/reline/commit/17d12cc511
2024-04-16[ruby/reline] Implement changing editing modeMari Imaizumi
(https://github.com/ruby/reline/pull/681) https://github.com/ruby/reline/commit/501b9a6c5f
2024-04-15[ruby/reline] Remove not implemented methodMari Imaizumi
(https://github.com/ruby/reline/pull/680) https://github.com/ruby/reline/commit/84762fc588
2024-04-15[ruby/reline] Fix vi_to_column which was brokentomoya ishida
(https://github.com/ruby/reline/pull/679) https://github.com/ruby/reline/commit/9e93ad52e7
2024-04-15[ruby/optparse] bump up to 0.5.0Nobuyoshi Nakada
https://github.com/ruby/optparse/commit/f5018a8b1c
2024-04-15show warning for unused blockKoichi Sasada
With verbopse mode (-w), the interpreter shows a warning if a block is passed to a method which does not use the given block. Warning on: * the invoked method is written in C * the invoked method is not `initialize` * not invoked with `super` * the first time on the call-site with the invoked method (`obj.foo{}` will be warned once if `foo` is same method) [Feature #15554] `Primitive.attr! :use_block` is introduced to declare that primitive functions (written in C) will use passed block. For minitest, test needs some tweak, so use https://github.com/minitest/minitest/commit/ea9caafc0754b1d6236a490d59e624b53209734a for `test-bundled-gems`.
2024-04-14[ruby/reline] Refactored Default Key BindingsMari Imaizumi
(https://github.com/ruby/reline/pull/678) * Reduce duplicate method * Configured default key mapping with Readline when the method exists * Remove undefined methods https://github.com/ruby/reline/commit/155f7047bb
2024-04-14[ruby/reline] Refactor waiting_proc and waiting_operator_proctomoya ishida
(https://github.com/ruby/reline/pull/649) * Fix waiting_proc precedence * Fix waiting_operator bugs * Add waiting_proc and vi_waiting_operator test * Fix vi waiting operator arg number vi_arg and vi_waiting_operator_arg should be multiplied * Implement `yy` copies whole line in vi_command mode * Simplify incremental search cancel test * Add complex vi test with waiting_proc and vi_waiting_operator, split test input https://github.com/ruby/reline/commit/777dffae1c
2024-04-14[ruby/irb] Allow defining custom commands in IRBStan Lo
(https://github.com/ruby/irb/pull/886) This is a feature that has been requested for a long time. It is now possible to define custom commands in IRB. Example usage: ```ruby require "irb/command" class HelloCommand < IRB::Command::Base description "Prints hello world" category "My commands" help_message "It doesn't do more than printing hello world." def execute puts "Hello world" end end IRB::Command.register(:hello, HelloCommand) ``` https://github.com/ruby/irb/commit/888643467c
2024-04-14[ruby/reline] Support `menu-complete-backward` command for upwardMichael J. Giarlo
navigation (https://github.com/ruby/reline/pull/677) Fixes https://github.com/ruby/reline/pull/675 This commit extracts the upward navigation condition in `LineEditor#input_key` to a new private method, and adds a new alias. This change allows Reline to support upward navigation in when a user has configured `inputrc` to map Shift-Tab to `menu-complete-backward`, a common setting in Bash (>= 4.x). Instead of special-casing upward navigation in `LineEditor#input_key`, we now allow it to be processed by the branch that calls `process_key`. The extracted method no longer includes the editing mode check since this check is already made by `#wrap_method_call` by the time `#completion_journey_up` (or `#menu_complete_backward`) is called. Since upward navigation is happening in a method other than `#input_key` now, the `completion_occurs` variable that used to be local to `#input_key` is changed to an instance variable so that the new method can change its value. (I see many examples of mutating such instance variables in `LineEditor`, so I assumed this would be an uncontroversial change consistent with the coding practices already in place.) Test coverage of this change has been added to the emacs and vi `KeyActor` tests. Many thanks to @ima1zumi for their very helpful comments on #675 which encouraged me to contribute this work! https://github.com/ruby/reline/commit/2ccdb374a4
2024-04-12[ruby/prism] Fix parser translation's heredoc whitespace calculationStan Lo
Given this example: ```rb <<~HEREDOC #{x} HEREDOC ``` Both the parser gem and Prism's translation layer would generate the following AST: ``` s(:dstr, s(:begin, s(:int, 1)), s(:str, " a\n")) ``` However, the parser gem inserts a empty string node into this node's location, like: ``` <Parser::Source::Map::Heredoc:0x0000000104ce73b8 @expression=#<Parser::Source::Range (string) 0...10>, @heredoc_body=#<Parser::Source::Range (string) 11...20>, @heredoc_end=#<Parser::Source::Range (string) 20...27>, @node=s(:dstr, s(:str, ""), s(:begin, s(:int, 1)), s(:str, " a\n"))> ``` This is required to calculate the correct whitespace for the heredoc body. We need to adjust the translation layer to account for this. With this fix, we also won't need to ignore the tilde heredoc fixture anymore. https://github.com/ruby/prism/commit/e7372e3ba5
2024-04-12[rubygems/rubygems] `bundle add --glob` continued- quote glob value ↵David Marshall
invocation in specs, add banner text for CLI recommending single quotes https://github.com/rubygems/rubygems/commit/6d2cf955f9
2024-04-12[rubygems/rubygems] bundler CLI option for add gem --glob=David Marshall
Bundler online documentation says that if the gem is located within a subdirectory of a git repository, you can use the `:glob` option to specify the location of its .gemspec `gem 'cf-copilot', git: 'https://github.com/cloudfoundry/copilot', glob: 'sdk/ruby/*.gemspec'` This change allows for equivalent functionality from the bundler CLI `bundle add cf-copilot --git=https://github.com/cloudfoundry/copilot --glob=sdk/ruby/*.gemspec` https://github.com/rubygems/rubygems/commit/91052e5868
2024-04-12[ruby/irb] Pass statements to Context#evaluateStan Lo
(https://github.com/ruby/irb/pull/920) This has a few benefits: - We can keep hiding the evaluation logic inside the Context level, which has always been the convention until #824 was merged recently. - Although not an official API, gems like `debug` and `mission_control-jobs` patch `Context#evaluate` to wrap their own logic around it. This implicit contract was broken after #824, and this change restores it. In addition to the refactor, I also converted some context-level evaluation tests into integration tests, which are more robust and easier to maintain. https://github.com/ruby/irb/commit/b32aee4068
2024-04-11[rubygems/rubygems] Fix installing plugins via relative pathsCody Cutrer
This affected both CLI and Gemfile installs https://github.com/rubygems/rubygems/commit/a0d101a8df
2024-04-11[ruby/prism] Add Location#chopKevin Newton
https://github.com/ruby/prism/commit/5dd57f4b84
2024-04-10[ruby/irb] Add a workaround to make IRB work with debug's testsStan Lo
(https://github.com/ruby/irb/pull/919) https://github.com/ruby/irb/commit/eb442c4dda
2024-04-10[ruby/irb] Centralize rstrip callsStan Lo
(https://github.com/ruby/irb/pull/918) https://github.com/ruby/irb/commit/97898b6251
2024-04-10[ruby/irb] Command implementation not by methodtomoya ishida
(https://github.com/ruby/irb/pull/824) * Command is not a method * Fix command test * Implement non-method command name completion * Add test for ExtendCommandBundle.def_extend_command * Add helper method install test * Remove spaces in command input parse * Remove command arg unquote in help command * Simplify Statement and handle execution in IRB::Irb * Tweak require, const name * Always install CommandBundle module to main object * Remove considering local variable in command or expression check * Remove unused method, tweak * Remove outdated comment for help command arg Co-authored-by: Stan Lo <stan001212@gmail.com> --------- https://github.com/ruby/irb/commit/8fb776e379 Co-authored-by: Stan Lo <stan001212@gmail.com>
2024-04-10[ruby/ipaddr] Added IPAddr#wildcard_maskTaketo Takashima
https://github.com/ruby/ipaddr/commit/2093cebc1d
2024-04-09[ruby/reline] Bump version to 0.5.1Mari Imaizumi
(https://github.com/ruby/reline/pull/672) https://github.com/ruby/reline/commit/d348df90d2
2024-04-08[ruby/tmpdir] Display the offending parent path in the exceptionNobuyoshi Nakada
https://github.com/ruby/tmpdir/commit/7751b12e97
2024-04-08Fix error when default gem is loaded from `-r` optionMasataka Pocke Kuwabara
This patch fixes an error when a default gem that will be migrated to a bundled gem is loaded from `-r` option. Problem === `bundle exec ruby -rostruct -e ''` unexpectedly raises the following error: ```console $ ruby -v ruby 3.4.0dev (2024-04-08T02:39:00Z master 6f7e8e278f) [arm64-darwin21] $ bundle init && bundle install $ bundle exec ruby -rostruct -e '' /Users/kuwabara.masataka/.rbenv/versions/trunk/lib/ruby/3.4.0+0/bundled_gems.rb:111:in 'Gem::BUNDLED_GEMS.warning?': undefined method 'find' for nil (NoMethodError) caller = caller_locations(3, 3).find {|c| c&.absolute_path} ^^^^^ from /Users/kuwabara.masataka/.rbenv/versions/trunk/lib/ruby/3.4.0+0/bundled_gems.rb:75:in 'block (2 levels) in Kernel#replace_require' ``` Solution === This patch uses a safe navigation operator to fix this problem. By this change, the command will show the warning message correctly. ```console $ bundle exec ruby -rostruct -e '' warning: ostruct was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.5.0. Add ostruct to your Gemfile or gemspec. ```
2024-04-06[ruby/reline] Continue processing even if terminfo database couldn'tMari Imaizumi
be found (https://github.com/ruby/reline/pull/673) Fix https://github.com/ruby/reline/issues/447 https://github.com/ruby/reline/issues/543 This problem occurs when Fiddle can be loaded, curses can be loaded, and TERM is not registered in Terminfo. It should also occur at hardcopy terminals and when Terminfo information is low, but no such reports have been received. Reline should not abort the process because of missing Terminfo. Reline proceeds with `Reline::Terminfo.enabled? == false` when fiddle or curses cannot be loaded. And does the same when Terminfo is present but TERM is not. https://github.com/ruby/reline/blob/ebab2875f1226f877376558d8758bc0e2a1776c7/lib/reline/terminfo.rb#L156-L160 You can check the operation with `TERM=foo bundle exec bin/console`. https://github.com/ruby/reline/commit/4ce247ce2b
2024-04-05[ruby/prism] Bump to v0.25.0Kevin Newton
https://github.com/ruby/prism/commit/4da514456f
2024-04-05[ruby/irb] Filter backtrace before format in handle_exceptionJoshua Broughton
(https://github.com/ruby/irb/pull/916) handle_exception now applies the filter_backtrace to exception backtraces prior to formatting the lines with Exception#full_message This fixes a bug in upstream projects, notably Rails, where the backtrace filtering logic expects the lines to be formatted as Exception#backtrace. https://github.com/ruby/irb/commit/805ee008f9 Co-authored-by: Hartley McGuire <skipkayhil@gmail.com>
2024-04-05[ruby/reline] Thread safe readlinetomoya ishida
(https://github.com/ruby/reline/pull/669) Block until other Reline.readline or Reline.readmultiline finish https://github.com/ruby/reline/commit/ebab2875f1