aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* [rubygems/rubygems] Prefer String#split with block in ↵Mau Magnaguagno2023-12-051-1/+1
| | | | | | | | Bundler::CompactIndexClient::Cache#versions String#split supports a block since Ruby 2.6, avoiding intermediate array. https://github.com/rubygems/rubygems/commit/4e864a8f2e
* [rubygems/rubygems] Prefer String#split with block in ↵Mau Magnaguagno2023-12-051-1/+1
| | | | | | | | Bundler::YAMLSerializer#load String#split supports a block since Ruby 2.6, avoiding intermediate array. https://github.com/rubygems/rubygems/commit/5b324969cd
* [ruby/syntax_suggest] Bump minimum Ruby version & update standardrbSchneems2023-12-044-5/+5
| | | | https://github.com/ruby/syntax_suggest/commit/73753518e9
* [ruby/syntax_suggest] Update standardrb to Ruby 3.0 standardsSchneems2023-12-043-6/+6
| | | | https://github.com/ruby/syntax_suggest/commit/2771dcabe0
* [ruby/prism] Fix up docs for lex_compatKevin Newton2023-12-041-4/+4
| | | | https://github.com/ruby/prism/commit/9131e84060
* [ruby/prism] Ripper compat docs updateKevin Newton2023-12-041-34/+49
| | | | https://github.com/ruby/prism/commit/5f70b32b02
* [ruby/irb] Bump version to v1.10.0Stan Lo2023-12-031-2/+2
| | | | | | (https://github.com/ruby/irb/pull/798) https://github.com/ruby/irb/commit/4acc9b8d6c
* [Fix] Support when nil is assigned to variable `name` (#9105)jinroq2023-12-021-1/+1
| | | * Add `!name.nil?` to if condition
* [ruby/rdoc] Markup punctuations need to be separated with a spaceNobuyoshi Nakada2023-12-021-1/+1
| | | | https://github.com/ruby/rdoc/commit/83f0149fc1
* [ruby/irb] Implement `history` commandGary Tou2023-12-022-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://github.com/ruby/irb/pull/761) * Implement `history` command Lists IRB input history with indices. Also aliased as `hist`. * Add tests for `history` command * Address feedback: `puts` with multiple arguments instead of `join`ing * Address feedback: Handle nil from splitting an empty input string * Refactor line truncation * Add `-g` grep option to `history` command * Add `history` command to README * Remove unused `*args` parameter * Allow spaces to be included in grep * Allow `/` to be included in grep regex * Handle `input` being an empty string * Exclude "#{index}: " from matching the grep regex * Add new line after joining https://github.com/ruby/irb/commit/3f9eacbfa9
* [ruby/prism] Prism.parse_success?(source)Kevin Newton2023-12-012-1/+30
| | | | | | | | | | | | A lot of tools use Ripper/RubyVM::AbstractSyntaxTree to determine if a source is valid. These tools both create an AST instead of providing an API that will return a boolean only. This new API only creates the C structs, but doesn't bother reifying them into Ruby/the serialization API. Instead it only returns true/false, which is significantly more efficient. https://github.com/ruby/prism/commit/7014740118
* [rubygems/rubygems] Reduce array allocations when loading definitionSamuel Giddins2023-12-012-4/+14
| | | | | | The same array was being re-created in a loop (as well as the `generic_local_platform`), which is avoidable by hoisting it to a frozen array created once https://github.com/rubygems/rubygems/commit/009a3c6d0d
* [ruby/prism] Provide heredoc? queriesKevin Newton2023-12-011-16/+41
| | | | https://github.com/ruby/prism/commit/e148e8fe6a
* [ruby/irb] Scrub past history input before splithogelog2023-12-011-1/+1
| | | | | | | | | | (https://github.com/ruby/irb/pull/795) * Scrub past history input before split * Don't rewrite ENV["LANG"] https://github.com/ruby/irb/commit/0f344f66d9
* [rubygems/rubygems] Many major_deprecations supply :removed_messageEric Mueller2023-12-017-46/+91
| | | | | | | | | | Generally the removed message is very similar, but often it needs to specify that the feature has "been removed" instead of "will be removed", or "been deprecated". And a few chunks of text needed more substantial updates. And a number of them seemed to have been carefully crafted to make sense in either context, so I left those alone. https://github.com/rubygems/rubygems/commit/8d42cf9104
* [rubygems/rubygems] major_deprecation accepts :removed_messageEric Mueller2023-12-011-3/+5
| | | | | | | If supplied, it uses that in place of the message for the case where the deprecation version is already past. https://github.com/rubygems/rubygems/commit/1deb73663c
* [ruby/prism] Change numbered parametersKevin Newton2023-12-011-3/+8
| | | | | | | | | | | | | | | | | | | | Previously numbered parameters were a field on blocks and lambdas that indicated the maximum number of numbered parameters in either the block or lambda, respectively. However they also had a parameters field that would always be nil in these cases. This changes it so that we introduce a NumberedParametersNode that goes in place of parameters, which has a single uint8_t maximum field on it. That field contains the maximum numbered parameter in either the block or lambda. As a part of the PR, I'm introducing a new UInt8Field type that can be used on nodes, which is just to make it a little more explicit what the maximum values can be (the maximum is actually 9, since it only goes up to _9). Plus we can do a couple of nice things in serialization like just read a single byte. https://github.com/ruby/prism/commit/2d87303903
* [ruby/prism] Fix comments after HEREDOCs again.Martin Emde2023-12-011-13/+8
| | | | | | | | | | | The problem was deeper than just looking back a single token. You can push the heredoc_end token way back into the list. We need to save the last location of a heredoc end to see if it's the last token in the file. Fixes https://github.com/ruby/prism/pull/1954 https://github.com/ruby/prism/commit/91dfd4eecd
* [PRISM] Consolidate prism encoding filesKevin Newton2023-11-301-8/+2
|
* [PRISM] Big5 encodingsKevin Newton2023-11-301-1/+0
|
* [PRISM] Alias CP51932 to EUC-JPKevin Newton2023-11-301-1/+0
|
* [PRISM] Consolidate SJIS encodingsKevin Newton2023-11-301-3/+1
|
* [rubygems/rubygems] Only show "Defaulting to user installation" message when ↵Ellen Marie Dash2023-11-301-1/+11
| | | | | | it matters. https://github.com/rubygems/rubygems/commit/61b0947225
* [ruby/irb] Page evaluation result's outputStan Lo2023-11-302-14/+17
| | | | | | | | | | | | | | (https://github.com/ruby/irb/pull/784) * Page evaluation result's output This will make it easier to work with long output that exceeds the terminal's height. * Use consistent TERM in rendering tests This makes sure we get consistent result on all platforms. https://github.com/ruby/irb/commit/4fedce93d3
* [ruby/prism] Fix lex_compat for `<<HEREDOC # comment` at EOFMartin Emde2023-11-301-8/+23
| | | | | | Fixes https://github.com/ruby/prism/pull/1874 https://github.com/ruby/prism/commit/304dd78dd2
* [rubygems/rubygems] Allow auto-install to install missing git gemsSamuel Giddins2023-11-301-1/+1
| | | | | | | | | | | | Currently, auto-install with git gems fails, when it would succeed with a rubygems-source gem Fix the issue by doing the same fallback for git errors as we do for missing gems, the git errors should only bubble up in these cases when the gem is not installed, meaning we want to go through the install flow (and any persistent errors will be raised through there) https://github.com/rubygems/rubygems/commit/e25a339f7a
* Manually sync with https://github.com/ruby/open3/pull/22 and related PRsHiroshi SHIBATA2023-11-301-24/+66
|
* [rubygems/rubygems] Avoid re-compiling static regexp in a loopSamuel Giddins2023-11-291-1/+1
| | | | | | Pathname::SEPARATOR_PAT is a constant and can safely be interpolated once, avoiding creating a new regexp object on every iteration https://github.com/rubygems/rubygems/commit/75d9c0f1e4
* [ruby/prism] Add MacJapanese encodingMatt Boldt2023-11-291-0/+1
| | | | | | | MacJapanese (also aliased as MacJapan) is a modified Shift_JIS encoding, but is implemented identically in Ruby https://github.com/ruby/prism/commit/9e0a097699
* [ruby/irb] Use gem repl_type_completor, remove type_completiontomoya ishida2023-11-297-2286/+30
| | | | | | | implementation (https://github.com/ruby/irb/pull/772) https://github.com/ruby/irb/commit/a4868a5373
* [ruby/prism] added CP950 encodingDhaval2023-11-291-0/+1
| | | | https://github.com/ruby/prism/commit/9c2d1cf4ba
* [rubygems/rubygems] update Magnus library in Rust extension gem templateMichael Go2023-11-291-1/+1
| | | | https://github.com/rubygems/rubygems/commit/46f09800da
* [ruby/prism] Implicit rest nodesKevin Newton2023-11-281-1/+1
| | | | | | | | | | | | | | | | | | Fundamentally, `foo { |bar,| }` is different from `foo { |bar, *| }` because of arity checks. This PR introduces a new node to handle that, `ImplicitRestNode`, which goes in the `rest` slot of parameter nodes instead of `RestParameterNode` instances. This is also used in a couple of other places, namely: * pattern matching: `foo in [bar,]` * multi target: `for foo, in bar do end` * multi write: `foo, = bar` Now the only splat nodes with a `NULL` value are when you're forwarding, as in: `def foo(*) = bar(*)`. https://github.com/ruby/prism/commit/dba2a3b652
* [ruby/irb] Change show_source tests into integration testsPeter Zhu2023-11-281-0/+2
| | | | | | | | | | | | | | * Remove trailing spaces * Migrate show_source tests to integration tests Because show_source tests often need to define class and/or methods, they can easily leak state to other tests. Changing them to integration tests will ensure that they are run in a clean environment. * Fix NoMethodError caused by SourceFinder#method_target https://github.com/ruby/irb/commit/3c39f13397c72a8db24e50afdcb8942e6c4ea12f
* [ruby/irb] This enhancement allows a user to add the -s flag if theypaulreece2023-11-282-8/+33
| | | | | | | | want to access a methods origin definition. It allows for chaining of multiple esses to further go up the classes as needed. (https://github.com/ruby/irb/pull/770) https://github.com/ruby/irb/commit/eec1329d5a
* [ruby/irb] Rescue errors from main.to_s/inspect when formattingKasumi Hanazuki2023-11-281-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | prompt (https://github.com/ruby/irb/pull/791) Currently, IRB just terminates if `main.to_s` raises while IRB constructs the prompt string. This can easily happen if the user wants to start an IRB session in the instance scope of an uninitialized object, for example: ``` class C def initialize binding.irb @values = [] end def to_s = @values.join(',') # raises if uninitialized end C.new ``` This patch makes IRB rescue from such an exception and displays the class name of the exception instead of `main.to_s` to indicate some error has occurred. We may display more detailed information about the exception, but this patch chooses not to do so because 1) the prompt has limited space, 2) users can evaluate `to_s` in IRB to examine the error if they want, and 3) obtaining the details can also raise, which requires nested exception handling and can be complicated. https://github.com/ruby/irb/commit/412ab26067
* [ruby/prism] Move DATA parsing into its own parse result fieldKevin Newton2023-11-283-18/+15
| | | | https://github.com/ruby/prism/commit/42b60b6e95
* [ruby/rdoc] [DOC] Slightly decorate `em` and `strong`Nobuyoshi Nakada2023-11-271-0/+11
| | | | https://github.com/ruby/rdoc/commit/2161157205
* [ruby/rdoc] Place a space between certain character class letters onlyNobuyoshi Nakada2023-11-273-2/+10
| | | | https://github.com/ruby/rdoc/commit/1f568e049d
* [ruby/irb] Hide debugger hint after the input is submittedStan Lo2023-11-271-1/+1
| | | | | | | | | | (https://github.com/ruby/irb/pull/789) If `output_modifier_proc`'s `complete` arg is true, it means the input is submitted. In that case, debugger hint doesn't provide value to users and adds noise to the output. So we hide it in such case. https://github.com/ruby/irb/commit/f86d9dbe2f
* Opaque Etags for compact index requestsJosef Šimánek2023-11-276-100/+288
| | | | | | | | | | | | | This changes the CompactIndexClient to store etags received from the compact index in separate files rather than relying on the MD5 checksum of the file as the etag. Smoothes the upgrade from md5 etags to opaque by generating them when no etag file exists. This should reduce the initial impact of changing the caching behavior by reducing cache misses when the MD5 etag is the same. Eventually, the MD5 behavior should be retired and the etag should be considered completely opaque with no assumption that MD5 would match.
* [rubygems/rubygems] Don't remember `--jobs` flagDavid Rodríguez2023-11-271-1/+19
| | | | https://github.com/rubygems/rubygems/commit/9ab1136036
* [rubygems/rubygems] Fix advice in `bundle install --system` deprecationDavid Rodríguez2023-11-271-1/+3
| | | | https://github.com/rubygems/rubygems/commit/59a66e3560
* [rubygems/rubygems] Keep a single copy of the remembered flag deprecation ↵David Rodríguez2023-11-271-7/+7
| | | | | | message https://github.com/rubygems/rubygems/commit/cb4e26eabc
* [rubygems/rubygems] Avoid some unnecessary quotes in remember flag ↵David Rodríguez2023-11-271-1/+2
| | | | | | deprecation message https://github.com/rubygems/rubygems/commit/3fd627e486
* [rubygems/rubygems] Simplify remembered flags deprecation messageDavid Rodríguez2023-11-271-1/+1
| | | | | | Configuration is now local by default. https://github.com/rubygems/rubygems/commit/6bc7709aa8
* [rubygems/rubygems] Add missing --prefer-local to Synopsis in ↵Olle Jonsson2023-11-2630-30/+31
| | | | | | bundle-install.1.ronn https://github.com/rubygems/rubygems/commit/e956c5bbe4
* [rubygems/rubygems] Reduce allocations when installing gems with bundlerSamuel Giddins2023-11-261-4/+9
| | | | | | | | | | | | | | | | | ``` ==> memprof.after.txt <== Total allocated: 1.13 MB (2352 objects) Total retained: 10.08 kB (78 objects) ==> memprof.before.txt <== Total allocated: 46.27 MB (38439 objects) Total retained: 9.94 kB (75 objects) ``` Yes, we were allocating 45MB of arrays in `dependencies_installed?`, it was accidentally cubic. https://github.com/rubygems/rubygems/commit/13ab874388
* [ruby/irb] Display aliases in help messageStan Lo2023-11-263-5/+19
| | | | | | | | | | | | | | | | | (https://github.com/ruby/irb/pull/788) Similar to Pry, it displays user-defined aliases in the help message with a dedicated section. With the current default aliases, it looks like: ``` ...other sections... Aliases $ Alias for `show_source` @ Alias for `whereami` ``` https://github.com/ruby/irb/commit/2a0eacc891
* [ruby/irb] Support disabling pagerStan Lo2023-11-263-1/+5
| | | | | | | | | | | (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