summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2023-12-05[rubygems/rubygems] Prefer String#split with block in Gem::YAMLSerializer#loadMau Magnaguagno
String#split supports a block since Ruby 2.6, avoiding intermediate array. https://github.com/rubygems/rubygems/commit/69cdf9e9d4
2023-12-05[rubygems/rubygems] Prefer String#split with block in ↵Mau Magnaguagno
Bundler::CompactIndexClient::Cache#versions String#split supports a block since Ruby 2.6, avoiding intermediate array. https://github.com/rubygems/rubygems/commit/4e864a8f2e
2023-12-05[rubygems/rubygems] Prefer String#split with block in ↵Mau Magnaguagno
Bundler::YAMLSerializer#load String#split supports a block since Ruby 2.6, avoiding intermediate array. https://github.com/rubygems/rubygems/commit/5b324969cd
2023-12-04[ruby/syntax_suggest] Bump minimum Ruby version & update standardrbSchneems
https://github.com/ruby/syntax_suggest/commit/73753518e9
2023-12-04[ruby/syntax_suggest] Update standardrb to Ruby 3.0 standardsSchneems
https://github.com/ruby/syntax_suggest/commit/2771dcabe0
2023-12-04[ruby/prism] Fix up docs for lex_compatKevin Newton
https://github.com/ruby/prism/commit/9131e84060
2023-12-04[ruby/prism] Ripper compat docs updateKevin Newton
https://github.com/ruby/prism/commit/5f70b32b02
2023-12-03[ruby/irb] Bump version to v1.10.0Stan Lo
(https://github.com/ruby/irb/pull/798) https://github.com/ruby/irb/commit/4acc9b8d6c
2023-12-02[Fix] Support when nil is assigned to variable `name` (#9105)jinroq
* Add `!name.nil?` to if condition
2023-12-02[ruby/rdoc] Markup punctuations need to be separated with a spaceNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/83f0149fc1
2023-12-02[ruby/irb] Implement `history` commandGary Tou
(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
2023-12-01[ruby/prism] Prism.parse_success?(source)Kevin Newton
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
2023-12-01[rubygems/rubygems] Reduce array allocations when loading definitionSamuel Giddins
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
2023-12-01[ruby/prism] Provide heredoc? queriesKevin Newton
https://github.com/ruby/prism/commit/e148e8fe6a
2023-12-01[ruby/irb] Scrub past history input before splithogelog
(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
2023-12-01[rubygems/rubygems] Many major_deprecations supply :removed_messageEric Mueller
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
2023-12-01[rubygems/rubygems] major_deprecation accepts :removed_messageEric Mueller
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
2023-12-01[ruby/prism] Change numbered parametersKevin Newton
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
2023-12-01[ruby/prism] Fix comments after HEREDOCs again.Martin Emde
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
2023-11-30[PRISM] Consolidate prism encoding filesKevin Newton
2023-11-30[PRISM] Big5 encodingsKevin Newton
2023-11-30[PRISM] Alias CP51932 to EUC-JPKevin Newton
2023-11-30[PRISM] Consolidate SJIS encodingsKevin Newton
2023-11-30[rubygems/rubygems] Only show "Defaulting to user installation" message when ↵Ellen Marie Dash
it matters. https://github.com/rubygems/rubygems/commit/61b0947225
2023-11-30[ruby/irb] Page evaluation result's outputStan Lo
(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
2023-11-30[ruby/prism] Fix lex_compat for `<<HEREDOC # comment` at EOFMartin Emde
Fixes https://github.com/ruby/prism/pull/1874 https://github.com/ruby/prism/commit/304dd78dd2
2023-11-30[rubygems/rubygems] Allow auto-install to install missing git gemsSamuel Giddins
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
2023-11-30Manually sync with https://github.com/ruby/open3/pull/22 and related PRsHiroshi SHIBATA
2023-11-29[rubygems/rubygems] Avoid re-compiling static regexp in a loopSamuel Giddins
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
2023-11-29[ruby/prism] Add MacJapanese encodingMatt Boldt
MacJapanese (also aliased as MacJapan) is a modified Shift_JIS encoding, but is implemented identically in Ruby https://github.com/ruby/prism/commit/9e0a097699
2023-11-29[ruby/irb] Use gem repl_type_completor, remove type_completiontomoya ishida
implementation (https://github.com/ruby/irb/pull/772) https://github.com/ruby/irb/commit/a4868a5373
2023-11-29[ruby/prism] added CP950 encodingDhaval
https://github.com/ruby/prism/commit/9c2d1cf4ba
2023-11-29[rubygems/rubygems] update Magnus library in Rust extension gem templateMichael Go
https://github.com/rubygems/rubygems/commit/46f09800da
2023-11-28[ruby/prism] Implicit rest nodesKevin Newton
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
2023-11-28[ruby/irb] Change show_source tests into integration testsPeter Zhu
* 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
2023-11-28[ruby/irb] This enhancement allows a user to add the -s flag if theypaulreece
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
2023-11-28[ruby/irb] Rescue errors from main.to_s/inspect when formattingKasumi Hanazuki
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
2023-11-28[ruby/prism] Move DATA parsing into its own parse result fieldKevin Newton
https://github.com/ruby/prism/commit/42b60b6e95
2023-11-27[ruby/rdoc] [DOC] Slightly decorate `em` and `strong`Nobuyoshi Nakada
https://github.com/ruby/rdoc/commit/2161157205
2023-11-27[ruby/rdoc] Place a space between certain character class letters onlyNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/1f568e049d
2023-11-27[ruby/irb] Hide debugger hint after the input is submittedStan Lo
(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
2023-11-27Opaque Etags for compact index requestsJosef Šimánek
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.
2023-11-27[rubygems/rubygems] Don't remember `--jobs` flagDavid Rodríguez
https://github.com/rubygems/rubygems/commit/9ab1136036
2023-11-27[rubygems/rubygems] Fix advice in `bundle install --system` deprecationDavid Rodríguez
https://github.com/rubygems/rubygems/commit/59a66e3560
2023-11-27[rubygems/rubygems] Keep a single copy of the remembered flag deprecation ↵David Rodríguez
message https://github.com/rubygems/rubygems/commit/cb4e26eabc
2023-11-27[rubygems/rubygems] Avoid some unnecessary quotes in remember flag ↵David Rodríguez
deprecation message https://github.com/rubygems/rubygems/commit/3fd627e486
2023-11-27[rubygems/rubygems] Simplify remembered flags deprecation messageDavid Rodríguez
Configuration is now local by default. https://github.com/rubygems/rubygems/commit/6bc7709aa8
2023-11-26[rubygems/rubygems] Add missing --prefer-local to Synopsis in ↵Olle Jonsson
bundle-install.1.ronn https://github.com/rubygems/rubygems/commit/e956c5bbe4
2023-11-26[rubygems/rubygems] Reduce allocations when installing gems with bundlerSamuel Giddins
``` ==> 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
2023-11-26[ruby/irb] Display aliases in help messageStan Lo
(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