aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Re-generate RDoc::RD parsers with racc-1.7.0Hiroshi SHIBATA2023-06-082-4/+1298
|
* [ruby/racc] Bump up v1.7.0Hiroshi SHIBATA2023-06-081-1/+1
| | | | https://github.com/ruby/racc/commit/0feca00301
* Update parser-text.rb with https://github.com/ruby/racc/pull/218Hiroshi SHIBATA2023-06-081-1/+22
|
* Unify length field for embedded and heap strings (#7908)Peter Zhu2023-06-061-4/+1
| | | | | | | | * Unify length field for embedded and heap strings The length field is of the same type and position in RString for both embedded and heap allocated strings, so we can unify it. * Remove RSTRING_EMBED_LEN
* [rubygems/rubygems] Delay cache access in `LockfileParser`David Rodríguez2023-06-061-4/+7
| | | | | | | | It's the only part that needs "root folder resultion" to figure out the folder for the cache, but it's only needed for some things, so run that logic lazily when needed. https://github.com/rubygems/rubygems/commit/c7b9eae0bc
* [rubygems/rubygems] Fix `path` vs `deployment` precedence when path set ↵David Rodríguez2023-06-061-2/+3
| | | | | | | | | through ENV The `deployment` setting sets `path` to `vendor/bundle` implicitly, but that should only apply if `path` is not set explicitly, at any level. https://github.com/rubygems/rubygems/commit/3552c064c1
* [rubygems/rubygems] Fix inline mode with multiple sourcesDavid Rodríguez2023-06-061-0/+1
| | | | | | | | | | | | If we're in inline mode, Bundler first resolves using only local gems, and if some gems are missing, then it re-resolves using remote gems. However, "source resolution" from the initial "local" try was being memoized, resulting in Bundler not looking for some gems remotely in the second resolution. This commit forces a proper re-resolve in this case. https://github.com/rubygems/rubygems/commit/fdc631075e
* [ruby/irb] Refactor ExtendCommand::NopStan Lo2023-06-052-8/+6
| | | | | | | | | | | (https://github.com/ruby/irb/pull/598) * Rename conf to irb_context * Drop Nop#irb method because it's only used by irb/ext/loader.rb We don't need to expose this method to all command classes, especially when it's just an alias of `irb_context.irb`.
* [ruby/irb] Simplify irb_info commandStan Lo2023-06-051-18/+14
| | | | | | (https://github.com/ruby/irb/pull/597) https://github.com/ruby/irb/commit/0a0409c52b
* [ruby/irb] Fixed string escaping omissionsima1zumi2023-06-051-1/+1
| | | | | | | (https://github.com/ruby/irb/pull/599) I received a `RegexpError` when I typed `::Array[`. ::Array[/Users/mi/ghq/github.com/ruby/irb/lib/irb/completion.rb:236:in `retrieve_completion_data': premature end of char-class: /^Array[/ (RegexpError)
* [ruby/singleton] Simplify implementation of `Singleton#instance`.Daniel Pepper2023-06-051-6/+1
| | | | | | (https://github.com/ruby/singleton/pull/9) - Add more tests to cover rails' usage.
* [ruby/singleton] Revert "Simplify the implementationHiroshi SHIBATA2023-06-051-9/+17
| | | | | | | | | | (https://github.com/ruby/singleton/pull/7)" This reverts commit https://github.com/ruby/singleton/commit/545b6b61a40d. This change break Rails CI: https://bugs.ruby-lang.org/issues/19711 https://github.com/ruby/singleton/commit/911531d508
* [ruby/irb] Bump version to 1.7.0Stan Lo2023-06-041-2/+2
| | | | | | (https://github.com/ruby/irb/pull/596) https://github.com/ruby/irb/commit/c2e7002867
* [ruby/reline] Bump version to 0.3.5Stan Lo2023-06-031-1/+1
| | | | | | (https://github.com/ruby/reline/pull/548) https://github.com/ruby/reline/commit/4330a52572
* [ruby/rdoc] Auto-correct trailing new linesVinicius Stock2023-06-0363-66/+0
| | | | https://github.com/ruby/rdoc/commit/4b68c0728a
* [ruby/singleton] Simplify the implementationDaniel Pepper2023-06-031-17/+9
| | | | | | (https://github.com/ruby/singleton/pull/7) Remove `__init__` and move logic to `included`.
* [ruby/reline] Remove unnecessary conditions forNobuyoshi Nakada2023-06-021-15/+1
| | | | | | | `Fiddle::TYPE_VARIADIC` (https://github.com/ruby/reline/pull/547) https://github.com/ruby/reline/commit/71ba3a9432
* [ruby/uri] Drop support for 2.4Nobuyoshi Nakada2023-06-021-1/+1
| | | | https://github.com/ruby/uri/commit/21baf2ba16
* [ruby/syntax_suggest] Use hard-coded filename for executables.Hiroshi SHIBATA2023-06-011-1/+1
| | | | | | It's hard to handle between ruby/syntax_suggest and ruby/ruby at gemspec. https://github.com/ruby/syntax_suggest/commit/0ee7496668
* Merge RubyGems/Bundler master from 4076391fce5847689bf2ec402b17133fe4e32285Hiroshi SHIBATA2023-05-305-10/+11
|
* [ruby/racc] Remove ErrorSymbolValue referenceJeremy Evans2023-05-301-4/+0
| | | | | | | | I cannot find where this is defined. I'm guessing neither this nor the else branch is ever hit. I only found out when testing VM changes, which had a bug that exposed this. https://github.com/ruby/racc/commit/8983d0c134
* [ruby/cgi] Add TruffleRuby support and add it in CIBenoit Daloze2023-05-291-3/+6
| | | | https://github.com/ruby/cgi/commit/1240fec9c9
* mkmf: Add the extra option `--with-verbose` to enable verbose mode. (#7863)Jun Aruga2023-05-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is to add an extra option to enable verbose mode (V=1) in the generated `Makefile` at runtime of the Ruby to print compiler command lines by the commands below when building native extensions. It's possible to enable the verbose mode by setting the environment variable `MAKEFLAGS="V=1"`[1] implemented in GNU make. However, I wanted to make a consistent user-interface not depending on the specific make's implementation. ``` $ ruby /path/to/extconf.rb -- --with-verbose ``` You can also add the extra option via rake-compiler gem. ``` $ rake compiler -- --with-verbose ``` If the extra option is not given, the value of the `RbConfig::CONFIG["MKMF_VERBOSE"]` enabled by the configure option below is used. ``` $ ./configure --enable-mkmf-verbose ``` For the unit tests, updated the following files. * The `test/mkmf/test_configuration.rb` was created to test the cases with the `configuration` method and this implementation. * Updated the `TestMkmf#assert_separately` to set the extra arguments in `test/mkmf/base.rb`. Updated tests using the `assert_separately`. * Added tests for `MakeMakefile#with_config` in the `test/mkmf/test_config.rb`. [1] https://www.gnu.org/software/make/manual/html_node/Variables_002fRecursion.html Fixes [Bug #19695] Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
* [ruby/irb] Set maximum document dialog height bytomoya ishida2023-05-281-0/+1
| | | | | | | preferred_dialog_height provided by Reline (https://github.com/ruby/irb/pull/591) https://github.com/ruby/irb/commit/df6907aca9
* [ruby/reline] Fix scrolldown condition in dialog renderingtomoya ishida2023-05-271-1/+1
| | | | | | (https://github.com/ruby/reline/pull/541) https://github.com/ruby/reline/commit/ad6faada3f
* [ruby/reline] Use appropriate dialog height and reduce screen pushuptomoya ishida2023-05-272-1/+11
| | | | | | | | | problem (https://github.com/ruby/reline/pull/542) * Provide preferred_dialog_height for dialog positioning * Fix rendering test
* [ruby/rdoc] Improve `<summary>` CSS on sidebarMasafumi Koba2023-05-261-7/+10
| | | | | | | | | | - Use a smaller font size for the toggle symbol. (Currently, it seems a little too large) - Use the child combinator (`>`) to unify selectors. - Use `margin-left` instead of whitespace within the `content` property. - Use `::` instead of outdated `:` for the pseudo-element symbol. (See https://developer.mozilla.org/en-US/docs/Web/CSS/::before) https://github.com/ruby/rdoc/commit/61ce0a7d75
* [ruby/rdoc] Improve layout CSSMasafumi Koba2023-05-261-5/+16
| | | | | | | | | | | | | - Use the `grid` property for the page layout. - https://caniuse.com/css-grid - Adjust the `<main>` margin. - Make the sidebar responsive and resizable. - https://caniuse.com/css-math-functions - https://caniuse.com/css-resize Note all modern browsers support the new CSS properties and functions used by this change. https://github.com/ruby/rdoc/commit/2db5097c41
* [rubygems/rubygems] Load plugin immediatelySutou Kouhei2023-05-251-0/+15
| | | | | | | | | | | | | | | We can install RubyGems plugin by "gem install XXX". The installed plugin is used from the NEXT "gem ...". For example, "gem install gem-src kaminari" doesn't use gem-src plugin for kaminari. "gem install gem-src && gem install kaminari" uses gem-src plugin for kaminari. How about loading a plugin immediately when the plugin is installed? If this proposal is implemented, "gem install gem-src kaminari" works like "gem install gem-src && gem install kaminari". https://github.com/rubygems/rubygems/commit/4917d96f4c
* Fixup 5bfb317a938Hiroshi SHIBATA2023-05-251-0/+0
|
* [ruby/benchmark] Don't use version.rbHiroshi SHIBATA2023-05-253-10/+9
| | | | https://github.com/ruby/benchmark/commit/6d51b10500
* Move gemspec files to top of lib directory.Hiroshi SHIBATA2023-05-258-8/+8
| | | | | | They have version.rb files with same directory. But version.rb have been removed at https://github.com/ruby/ruby/pull/3375 There is no reason to locate under the library name of directory.
* [ruby/csv] All Enumerable based methods consume the same lines with other ↵Sutou Kouhei2023-05-251-8/+1
| | | | | | | | | | | | methods This may have a performance penalty. We should benchmark this. GitHub: fix https://github.com/ruby/csv/pull/260 Reported by Lhoussaine Ghallou. Thanks!!! https://github.com/ruby/csv/commit/acc05116c5
* [ruby/csv] CSV#read consumes the same lines with other methods like CSV#shiftSutou Kouhei2023-05-251-1/+8
| | | | | | | | GitHub: fix https://github.com/ruby/csv/pull/258 Reported by Lhoussaine Ghallou. Thanks!!! https://github.com/ruby/csv/commit/71e6d24e28
* [ruby/csv] Remove no longer required refinementsMau Magnaguagno2023-05-252-38/+0
| | | | | | | | (https://github.com/ruby/csv/pull/250) Since PR #159, the minimum Ruby version is 2.5.0, a version which no longer requires refinements for String#delete_suffix?, String#match? and Regexp#match?.
* [rubygems/rubygems] Remove forward slash in key regardless if it contains __Jenny Shen2023-05-231-1/+1
| | | | https://github.com/rubygems/rubygems/commit/33a02eec00
* [rubygems/rubygems] Modify invalid key check to accept keys with colonsJenny Shen2023-05-231-1/+1
| | | | | | https://github.com/rubygems/rubygems/commit/413033198b Co-authored-by: Eric Herscovich <eric.herscovich@shopify.com>
* [ruby/irb] Allow `show_source` for private methodsTSUYUSATO Kitsune2023-05-231-3/+4
| | | | | | | | | | | | | | | | (https://github.com/ruby/irb/pull/589) * Allow `show_source` for private methods Fix https://github.com/ruby/irb/pull/577 * Pend tests on TruffleRuby It seems `eval(..., __LINE__ + 1)` does not work. Other similar tests are also pended on TruffleRuby, so I think it is acceptable. * Use `private_method_defined?` instead of `defined?`
* Manually merge syntax_suggest-1.1.0Hiroshi SHIBATA2023-05-236-142/+199
|
* [ruby/syntax_suggest] Fixschneems2023-05-233-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/ruby/syntax_suggest/pull/187 Handle if/else with empty/comment line Reported in #187 this code: ``` class Foo def foo if cond? foo else # comment end end # ... def bar if @recv end_is_missing_here end end ``` Triggers an incorrect suggestion: ``` Unmatched keyword, missing `end' ? 1 class Foo 2 def foo > 3 if cond? > 5 else 8 end 16 end ``` Part of the issue is that while scanning we're using newlines to determine when to stop and pause. This is useful for determining logically smaller chunks to evaluate but in this case it causes us to pause before grabbing the "end" that is right below the newline. This problem is similar to https://github.com/ruby/syntax_suggest/pull/179. However in the case of expanding same indentation "neighbors" I want to always grab all empty values at the end of the scan. I don't want to do that when changing indentation levels as it affects scan results. There may be some way to normalize this behavior between the two, but the tests really don't like that change. To fix this issue for expanding against different indentation I needed a way to first try and grab any additional newlines with the ability to rollback that guess. In #192 I experimented with decoupling scanning from the AroundBlockScan logic. It also added the ability to take a snapshot of the current scanner and rollback to prior changes. With this ability in place now we: - Grab extra empties before looking at the above/below line for the matching keyword/end statement - If there's a match, grab it - If there's no match, discard the newlines we picked up in the evaluation That solves the issue. https://github.com/ruby/syntax_suggest/commit/513646b912
* [ruby/syntax_suggest] Refactor Scanner logic out of AroundBlockScan ↵schneems2023-05-234-151/+259
| | | | | | | | | | | | | | | | | | | introduce history AroundBlockScan started as a utility class that was meant to be used as a DSL for scanning and making new blocks. As logic got added to this class it became hard to reason about what exactly is being mutated when. I pulled the scanning logic out into it's own class which gives us a clean separation of concerns. This allowed me to remove a lot of accessors that aren't core to the logic provided by AroundBlockScan. In addition to this refactor the ScanHistory class can snapshot a scan. This allows us to be more aggressive with scans in the future as we can now snapshot and rollback if it didn't turn out the way we wanted. The change comes with a minor perf impact: before: 5.092678 0.104299 5.196977 ( 5.226494) after: 5.128536 0.099871 5.228407 ( 5.249542) This represents a 0.996x change in speed (where 1x would be no change and 2x would be twice as fast). This is a 0.38% decrease in performance which is negligible. It's likely coming from the extra blocks being created while scanning. This is negligible and if the history feature works well we might be able to make better block decisions which is means fewer calls to ripper which is the biggest bottleneck. While this doesn't fix https://github.com/ruby/syntax_suggest/issues/187 it's a good intermediate step that will hopefully make working on that issue easier. https://github.com/ruby/syntax_suggest/commit/ad8487d8aa
* [ruby/syntax_suggest] Fix warning messageschneems2023-05-231-1/+1
| | | | | | The env var DEBUG does not work to produce detailed output. It is SYNTAX_SUGGEST_DEBUG. It was changed as part of the dead_end to syntax_suggest migration for Ruby 3.2 https://github.com/ruby/syntax_suggest/commit/c41da7aab7
* [ruby/reline] Bump version to 0.3.4ima1zumi2023-05-201-1/+1
| | | | | | (https://github.com/ruby/reline/pull/538) https://github.com/ruby/reline/commit/1fb0753bc1
* [ruby/irb] Simplify each_top_level_statementtomoya ishida2023-05-191-63/+49
| | | | | | | | | | | | | | | | | | | | | | (https://github.com/ruby/irb/pull/576) * Simplify each_top_level_statement, reduce instance vars * Update lib/irb/ruby-lex.rb Co-authored-by: Stan Lo <stan001212@gmail.com> * Remove unused ltype from TestRubyLex#check_state response * Remove unnecessary const path of TerminateLineInput * Combine duplicated code state check into method --------- https://github.com/ruby/irb/commit/172453cec4 Co-authored-by: Stan Lo <stan001212@gmail.com>
* [ruby/irb] Display mod key as `Option` on Darwin platformsAdam Daniels2023-05-191-1/+2
| | | | | | | (https://github.com/ruby/irb/pull/584) Check RUBY_PLATFORM for `darwin` and modify the mod key from `Alt` to `Option`.
* [ruby/irb] Refactor RubyLex's input/io methodsStan Lo2023-05-182-27/+23
| | | | | | | | | (https://github.com/ruby/irb/pull/583) 1. Make `RubyLex#set_input` simply assign the input block. This matches the behavior of `RubyLex#set_prompt`. 2. Merge `RubyLex#set_input`'s IO configuration logic with `#set_auto_indent` into `#configure_io`.
* [ruby/irb] Print deprecation warning for `help` commandStan Lo2023-05-183-45/+65
| | | | | | | | (https://github.com/ruby/irb/pull/567) * Give show_doc its own command class * Print deprecation warning for `help` command
* [rubygems/rubygems] Bump up thor-1.2.2Hiroshi SHIBATA2023-05-1317-66/+76
| | | | https://github.com/rubygems/rubygems/commit/d9a003b4e7
* Merge https://github.com/rubygems/rubygems/pull/6655 manually.Hiroshi SHIBATA2023-05-102-11/+33
|
* Update SPDX license listSamuel Giddins2023-05-101-0/+40
|