summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2023-06-27[rubygems/rubygems] Removed unused variableHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/68cc941bed
2023-06-27[rubygems/rubygems] Molinillo::DependencyGraph is initialized in ↵Hiroshi SHIBATA
Molinillo::Resolver#resolve https://github.com/rubygems/rubygems/commit/1c39e24c95
2023-06-25[ruby/uri] String literals are frozen nowNobuyoshi Nakada
https://github.com/ruby/uri/commit/0b6ad60af6
2023-06-25[ruby/uri] Fix host part in relative referece #83Nobuyoshi Nakada
In relative referece, host part can be ommitted but can not be empty. https://github.com/ruby/uri/commit/2980f0ba02
2023-06-25[ruby/irb] Fix process_continue(rename to should_continue?) andtomoya ishida
check_code_block(rename to check_code_syntax) (https://github.com/ruby/irb/pull/611) https://github.com/ruby/irb/commit/b7f4bfaaa4
2023-06-24[ruby/irb] Omit nesting_level, use indent_level to build prompttomoya ishida
string (https://github.com/ruby/irb/pull/610) https://github.com/ruby/irb/commit/f01ff0811b
2023-06-23[ruby/timeout] Bump up v0.4.0Hiroshi SHIBATA
https://github.com/ruby/timeout/commit/413194f8d2
2023-06-22[ruby/timeout] Raise exception instead of throw/catch for timeoutsJeremy Evans
(https://github.com/ruby/timeout/pull/30) throw/catch is used for non-local control flow, not for exceptional situations. For exceptional situations, raise should be used instead. A timeout is an exceptional situation, so it should use raise, not throw/catch. Timeout's implementation that uses throw/catch internally causes serious problems. Consider the following code: ```ruby def handle_exceptions yield rescue Exception => exc handle_error # e.g. ROLLBACK for databases raise ensure handle_exit unless exc # e.g. COMMIT for databases end Timeout.timeout(1) do handle_exceptions do do_something end end ``` This kind of design ensures that all exceptions are handled as errors, and ensures that all exits (normal exit, early return, throw/catch) are not handled as errors. With Timeout's throw/catch implementation, this type of code does not work, since a timeout triggers the normal exit path. See https://github.com/rails/rails/pull/29333 for an example of the damage Timeout's design has caused the Rails ecosystem. This switches Timeout.timeout to use raise/rescue internally. It adds a Timeout::ExitException subclass of exception for the internal raise/rescue, which Timeout.timeout will convert to Timeout::Error for backwards compatibility. Timeout::Error remains a subclass of RuntimeError. This is how timeout used to work in Ruby 2.0. It was changed in Ruby 2.1, after discussion in [Bug #8730] (commit https://github.com/ruby/timeout/commit/238c003c921e in the timeout repository). I think the change from using raise/rescue to using throw/catch has caused significant harm to the Ruby ecosystem at large, and reverting it is the most sensible choice. From the translation of [Bug #8730], it appears the issue was that someone could rescue Exception and not reraise the exception, causing timeout errors to be swallowed. However, such code is broken anyway. Using throw/catch causes far worse problems, because then it becomes impossible to differentiate between normal control flow and exceptional control flow. Also related to this is [Bug #11344], which changed how Thread.handle_interrupt interacted with Timeout. https://github.com/ruby/timeout/commit/f16545abe6 Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-06-22[ruby/reline] Remove unused methodima1zumi
(https://github.com/ruby/reline/pull/557) `get_mbchar_byte_size_by_first_char` isn't used in Reline. Also, this method implements the same functionality as `String#bytesize` and is unnecessary.
2023-06-22[ruby/ipaddr] Consider IPv4-mapped IPv6 addresses private if IPv4 address is ↵Jeremy Evans
private Fixes [Bug #19479] https://github.com/ruby/ipaddr/commit/7faa0768d3
2023-06-21[Feature #19741] Sync all files in yarpJemma Issroff
This commit is the initial sync of all files from ruby/yarp into ruby/ruby. Notably, it does the following: * Sync all ruby/yarp/lib/ files to ruby/ruby/lib/yarp * Sync all ruby/yarp/src/ files to ruby/ruby/yarp/ * Sync all ruby/yarp/test/ files to ruby/ruby/test/yarp Notes: Merged: https://github.com/ruby/ruby/pull/7964
2023-06-20[ruby/irb] Improve indentation: bugfix, heredoc, embdoc, stringstomoya ishida
(https://github.com/ruby/irb/pull/515) * Implement heredoc embdoc and string indentation with bugfix * Fix test_ruby_lex's indentation value * Add embdoc indent test * Add workaround for lines==[nil] passed to auto_indent when exit IRB with CTRL+d
2023-06-20[ruby/reline] Omit constant under StructYuta Kusuno
(https://github.com/ruby/reline/pull/554) https://github.com/ruby/reline/commit/8761a11fa5
2023-06-20Merge rubygems/rubygems HEADHiroshi SHIBATA
Pick from https://github.com/rubygems/rubygems/commit/880dd95996c93adc1e032399816931b243c5fe17 Notes: Merged: https://github.com/ruby/ruby/pull/7961
2023-06-19[ruby/irb] Add missing token that ignored by rippertomoya ishida
(https://github.com/ruby/irb/pull/608) https://github.com/ruby/irb/commit/1cd3b45402
2023-06-16[rubygems/rubygems] Auto-correct Performance/FlatMapHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/b696edcd73
2023-06-15[ruby/irb] Rewrite RubyLex to fix some bugs and make it possible totomoya ishida
add new features easily (https://github.com/ruby/irb/pull/500) * Add nesting level parser for multiple use (indent, prompt, termination check) * Rewrite RubyLex using NestingParser * Add nesting parser tests, fix some existing tests * Add description comment, rename method to NestingParser * Add comments and tweak code to RubyLex * Update NestingParser test * Extract list of ltype tokens to constants
2023-06-14[ruby/rdoc] Use flat_map for better performancePetrik
https://github.com/ruby/rdoc/commit/76192a280d
2023-06-15Merge rubygems/rubygems HEADHiroshi SHIBATA
Pick from https://github.com/rubygems/rubygems/commit/7a7b234721c375874b7e22b1c5b14925b943f04e
2023-06-15[rubygems/rubygems] auto-correct Style/YodaConditionHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/6d9e8025dc
2023-06-15[rubygems/rubygems] Improve error message in frozen mode edge caseDavid Rodríguez
When a top level dependency is missing from the lockfile, and we're in frozen mode, we should also print a "frozen error". https://github.com/rubygems/rubygems/commit/3e82b835e3
2023-06-15[rubygems/rubygems] Improve frozen mode error messageDavid Rodríguez
This error message is also printed when using `bundler/setup` in frozen model, so we're not necessarily installing any gems when it happens. This new message play nicer with all situations. https://github.com/rubygems/rubygems/commit/6874bbacce
2023-06-15[rubygems/rubygems] Use "frozen" rather than "deployment" in error messageDavid Rodríguez
I think it communicates better what's going on. https://github.com/rubygems/rubygems/commit/07a25767a4
2023-06-15[rubygems/rubygems] Show missing spec in lockfile incomplete error messageDavid Rodríguez
https://github.com/rubygems/rubygems/commit/b86caaa3d5
2023-06-15[rubygems/rubygems] Extract `Definition#no_resolved_needed?`David Rodríguez
https://github.com/rubygems/rubygems/commit/1ff8626571
2023-06-15[rubygems/rubygems] There should always be a reasonDavid Rodríguez
https://github.com/rubygems/rubygems/commit/4180008c2d
2023-06-15[rubygems/rubygems] Show relative path to Gemfile in error messageDavid Rodríguez
For conciseness and consistency with printing the relative path to the lockfile just before. https://github.com/rubygems/rubygems/commit/74cf6aea7c
2023-06-15[rubygems/rubygems] Remove weird line breaks in the middle of error messageDavid Rodríguez
https://github.com/rubygems/rubygems/commit/22b8caf42f
2023-06-15[rubygems/rubygems] Simplify checking Gemfile vs lockfile sourcesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/251e80aec6
2023-06-15[rubygems/rubygems] Make frozen mode spec also pass on Bundler 3David Rodríguez
https://github.com/rubygems/rubygems/commit/ad52f840f2
2023-06-14Update RDoc::RD parsers generated by racc-1.7.1Hiroshi SHIBATA
2023-06-13[ruby/irb] Use symbol.inspect instead of ":"+symbol.id2name to avoidtomoya ishida
completion candidates including newline characters (https://github.com/ruby/irb/pull/539) https://github.com/ruby/irb/commit/aaf0c46645
2023-06-13[rubygems/rubygems] Autoload shellwords when it's needed.Samuel Williams
https://github.com/rubygems/rubygems/commit/e916ccb2d9
2023-06-13[ruby/uri] Fix RFC3986 regexpsNobuyoshi Nakada
https://github.com/ruby/uri/commit/8e38592241
2023-06-13[ruby/uri] Refactor RFC3986 regexps to make more readableNobuyoshi Nakada
https://github.com/ruby/uri/commit/3dfa19e920
2023-06-10[ruby/irb] Use `Kernel.warn` to print command alias warningStan Lo
(https://github.com/ruby/irb/pull/601) This aligns with other warnings in irb and properly channel the message to stderr.
2023-06-10[ruby/irb] Remove the unused fork command definitionStan Lo
(https://github.com/ruby/irb/pull/600) https://github.com/ruby/irb/commit/b039b89343
2023-06-08[rubygems/rubygems] Stop publishing Gemfile in default gem templateGareth Adams
Similarly to how the other ignored files are intended for local development and not for production, the Gemfile and Gemfile.lock files for a gem only relate to local development and aren't useful to people installing the gem. https://github.com/rubygems/rubygems/commit/59049c04be
2023-06-08Try to promote racc as bundled gemsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7877
2023-06-08Re-generate RDoc::RD parsers with racc-1.7.0Hiroshi SHIBATA
2023-06-08[ruby/racc] Bump up v1.7.0Hiroshi SHIBATA
https://github.com/ruby/racc/commit/0feca00301
2023-06-08Update parser-text.rb with https://github.com/ruby/racc/pull/218Hiroshi SHIBATA
2023-06-06Unify length field for embedded and heap strings (#7908)Peter Zhu
* 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 Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2023-06-06[rubygems/rubygems] Delay cache access in `LockfileParser`David Rodríguez
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
2023-06-06[rubygems/rubygems] Fix `path` vs `deployment` precedence when path set ↵David Rodríguez
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
2023-06-06[rubygems/rubygems] Fix inline mode with multiple sourcesDavid Rodríguez
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
2023-06-05[ruby/irb] Refactor ExtendCommand::NopStan Lo
(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`.
2023-06-05[ruby/irb] Simplify irb_info commandStan Lo
(https://github.com/ruby/irb/pull/597) https://github.com/ruby/irb/commit/0a0409c52b
2023-06-05[ruby/irb] Fixed string escaping omissionsima1zumi
(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)
2023-06-05[ruby/singleton] Simplify implementation of `Singleton#instance`.Daniel Pepper
(https://github.com/ruby/singleton/pull/9) - Add more tests to cover rails' usage.