summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2021-10-16[ruby/rdoc] fix: alias to method with call-seqMike Dalessio
This change fixes alias call-seq to return nil if the method's call-seq does not specify the alias. Previously, the alias's call-seq would be an empty string in this case which broke darkfish rendering. This change also backfills test coverage for 0ead786 which moved call-seq deduplication into AnyMethod. https://github.com/ruby/rdoc/commit/5ce2789b6f
2021-10-16[ruby/rdoc] Support linking #==Mike Dalessio
See related commits: - ebc66662 for #=== - 4943d208 for #[], #[]=, #<<, and #>> https://github.com/ruby/rdoc/commit/8e47f7840a
2021-10-16[ruby/rdoc] feat: add support for :category: on C functionsMike Dalessio
https://github.com/ruby/rdoc/commit/45c92005fe
2021-10-16[ruby/rdoc] fix: comments in C files use the global markup optionMike Dalessio
Previously, Parser::C comments all defaulted to "rdoc" format, even when the user had set a different default with the `--markup=<choice>` option. https://github.com/ruby/rdoc/commit/4643b08a26
2021-10-16[ruby/rdoc] extract Comment creation in Parser::CMike Dalessio
This is a prefactor for fixing comment format handling. https://github.com/ruby/rdoc/commit/a3d366feed
2021-10-15Make explicit opening filesNobuyoshi Nakada
2021-10-15[rubygems/rubygems] Update broken link in ↵Jack Schuss
Bundler::Fetcher::CertificateFailureError https://github.com/rubygems/rubygems/commit/11b5d479cb
2021-10-14[ruby/drb] Bump up drb version to 2.1.0Hiroshi SHIBATA
https://github.com/ruby/drb/commit/e4b7b68d67
2021-10-14[ruby/drb] Bump up drb version to 2.0.5Hiroshi SHIBATA
https://github.com/ruby/drb/commit/7edf67654c
2021-10-14[ruby/time] Bump up time version to 0.2.0Hiroshi SHIBATA
https://github.com/ruby/time/commit/b9dd593b23
2021-10-14[ruby/open-uri] Bump up open-uri version to 0.2.0Hiroshi SHIBATA
https://github.com/ruby/open-uri/commit/ec4275a1eb
2021-10-14[ruby/base64] Bump up base64 version to 0.1.1Hiroshi SHIBATA
https://github.com/ruby/base64/commit/b9e23b27f9
2021-10-14[ruby/find] Bump up find version to 0.1.1Hiroshi SHIBATA
https://github.com/ruby/find/commit/90c35c477a
2021-10-14[ruby/yaml] Bump up yaml version to 0.2.0Hiroshi SHIBATA
https://github.com/ruby/yaml/commit/cef5360823
2021-10-14[ruby/timeout] Bump up timeout version to 0.2.0Hiroshi SHIBATA
https://github.com/ruby/timeout/commit/02e792ddd8
2021-10-14[ruby/cgi] Bump up cgi version to 0.3.0Hiroshi SHIBATA
https://github.com/ruby/cgi/commit/95324433b4
2021-10-14[ruby/benchmark] Bump up benchamark version to 0.2.0Hiroshi SHIBATA
https://github.com/ruby/benchmark/commit/eea1657fa2
2021-10-14[ruby/fileutils] Remove counterproductive optimizationDavid Rodríguez
I think it's debatable which is the most common usage of `FileUtils.mkdir_p`, but even assuming the most common use case is creating a folder when it doesn't previously exist but the parent does, this optimization doesn't seem to have a noticiable effect there while harming other use cases. For benchmarks, I created this script ```ruby require "benchmark/ips" Benchmark.ips do |x| x.report("old mkdir_p - exists") do FileUtils.mkdir_p "/tmp" end x.report("new_mkdir_p - exists") do FileUtils.mkdir_p_new "/tmp" end x.compare! end FileUtils.rm_rf "/tmp/foo" Benchmark.ips do |x| x.report("old mkdir_p - doesnt exist, parent exists") do FileUtils.mkdir_p "/tmp/foo" FileUtils.rm_rf "/tmp/foo" end x.report("new_mkdir_p - doesnt exist, parent exists") do FileUtils.mkdir_p_new "/tmp/foo" FileUtils.rm_rf "/tmp/foo" end x.compare! end Benchmark.ips do |x| x.report("old mkdir_p - doesnt exist, parent either") do FileUtils.mkdir_p "/tmp/foo/bar" FileUtils.rm_rf "/tmp/foo" end x.report("new_mkdir_p - doesnt exist, parent either") do FileUtils.mkdir_p_new "/tmp/foo/bar" FileUtils.rm_rf "/tmp/foo" end x.compare! end Benchmark.ips do |x| x.report("old mkdir_p - more levels") do FileUtils.mkdir_p "/tmp/foo/bar/baz" FileUtils.rm_rf "/tmp/foo" end x.report("new_mkdir_p - more levels") do FileUtils.mkdir_p_new "/tmp/foo/bar/baz" FileUtils.rm_rf "/tmp/foo" end x.compare! end ``` and copied the method with the "optimization" removed as `FileUtils.mkdir_p_new`. The results are as below: ``` Warming up -------------------------------------- old mkdir_p - exists 15.914k i/100ms new_mkdir_p - exists 46.512k i/100ms Calculating ------------------------------------- old mkdir_p - exists 161.461k (± 3.2%) i/s - 811.614k in 5.032315s new_mkdir_p - exists 468.192k (± 2.9%) i/s - 2.372M in 5.071225s Comparison: new_mkdir_p - exists: 468192.1 i/s old mkdir_p - exists: 161461.0 i/s - 2.90x (± 0.00) slower Warming up -------------------------------------- old mkdir_p - doesnt exist, parent exists 2.142k i/100ms new_mkdir_p - doesnt exist, parent exists 1.961k i/100ms Calculating ------------------------------------- old mkdir_p - doesnt exist, parent exists 21.242k (± 6.7%) i/s - 107.100k in 5.069206s new_mkdir_p - doesnt exist, parent exists 19.682k (± 4.2%) i/s - 100.011k in 5.091961s Comparison: old mkdir_p - doesnt exist, parent exists: 21241.7 i/s new_mkdir_p - doesnt exist, parent exists: 19681.7 i/s - same-ish: difference falls within error Warming up -------------------------------------- old mkdir_p - doesnt exist, parent either 945.000 i/100ms new_mkdir_p - doesnt exist, parent either 1.002k i/100ms Calculating ------------------------------------- old mkdir_p - doesnt exist, parent either 9.689k (± 4.4%) i/s - 49.140k in 5.084342s new_mkdir_p - doesnt exist, parent either 10.806k (± 4.6%) i/s - 54.108k in 5.020714s Comparison: new_mkdir_p - doesnt exist, parent either: 10806.3 i/s old mkdir_p - doesnt exist, parent either: 9689.3 i/s - 1.12x (± 0.00) slower Warming up -------------------------------------- old mkdir_p - more levels 702.000 i/100ms new_mkdir_p - more levels 775.000 i/100ms Calculating ------------------------------------- old mkdir_p - more levels 7.046k (± 3.5%) i/s - 35.802k in 5.087548s new_mkdir_p - more levels 7.685k (± 5.5%) i/s - 38.750k in 5.061351s Comparison: new_mkdir_p - more levels: 7685.1 i/s old mkdir_p - more levels: 7046.4 i/s - same-ish: difference falls within error ``` I think it's better to keep the code simpler is the optimization is not so clear like in this case. https://github.com/ruby/fileutils/commit/e842a0e70e
2021-10-14[ruby/fileutils] Simplify loop to find out segments to be createdDavid Rodríguez
Doing it this way is simpler and it doesn't end up adding "/" to the list of folders, so it doesn't need to be removed later. https://github.com/ruby/fileutils/commit/df08e124ce
2021-10-13[rubygems/rubygems] Remove unnecessary methodDavid Rodríguez
https://github.com/rubygems/rubygems/commit/97241e0ea4
2021-10-13[rubygems/rubygems] Reuse `sh` helper for `git push` tooDavid Rodríguez
https://github.com/rubygems/rubygems/commit/32aa540163
2021-10-13[rubygems/rubygems] Simplify some codeDavid Rodríguez
This method always receives an array, and we require `shellwords` unconditionally at the top of the file, so `shelljoin` will always be available. https://github.com/rubygems/rubygems/commit/05c8ac641d
2021-10-13[rubygems/rubygems] Reuse `sh` helperDavid Rodríguez
https://github.com/rubygems/rubygems/commit/c218d4d79e
2021-10-13[rubygems/rubygems] Improve error messages in gem helpersDavid Rodríguez
Previously they were printing the original command that was run, and telling the user to rerun it. However, the command sometimes would not match the exact command that was run (for example, when using the `--local` flag), and in any case, it's simpler and more useful to print the underlying error anyways. https://github.com/rubygems/rubygems/commit/5bc0d51b58
2021-10-13[rubygems/rubygems] Fix `bundle install` crash due to an incorrectly ↵David Rodríguez
incomplete resolve In case we have a corrupted lockfile that claims to support a platform, but it's missing platform specific gems for it, bundler has a check that detects the situation and forces a re-resolve. The result of this check is kept under the `@locked_specs_incomplete_for_platformn` instance variable in `Definition`. The installer, however, calls `Definition#nothing_changed?` before this instance variable has been filled, so the result of it is actually incorrect here since it will claim that nothing has changed, but something has changed (locked specs are incomplete for the current platform). The consequence of this incorrect result is that the installer thinks it can go on without re-resolving, resulting in the incomplete resolution from the lockfile being used, and in a crash being triggered due to that. The solution is to make sure the `@locked_specs_incomplete_for_platform` instance variable is filled before `nothing_changed?` gets called. Moving it to `initialize` makes the most sense, not because it's the best place for it (we can refactor this later), but because all of the other "outdated definition" checks are already set there. https://github.com/rubygems/rubygems/commit/708afdd789
2021-10-13[rubygems/rubygems] No need to use converged dependencies eitherDavid Rodríguez
This is exclusively about the lockfile. https://github.com/rubygems/rubygems/commit/d6c6d040cd
2021-10-13[rubygems/rubygems] Extract `locked_dependencies` helperDavid Rodríguez
https://github.com/rubygems/rubygems/commit/7326d47530
2021-10-13[rubygems/rubygems] Simplify the incomplete locked specs for platform checkDavid Rodríguez
It doesn't really need converged specs, since it's only about the lockfile. https://github.com/rubygems/rubygems/commit/9cd6224b5e
2021-10-13[rubygems/rubygems] Fix `bundle install` to force reinstallation of deleted gemsDavid Rodriguez
https://github.com/rubygems/rubygems/commit/8950631f02
2021-10-13[rubygems/rubygems] Use correct way to detect default gemsDavid Rodríguez
The other way, in particular matching a substring in the gemspec summary, is brittle and no longer used since Ruby 2.0. This needed rewriting the specs that depended on that way. https://github.com/rubygems/rubygems/commit/059dbfa971
2021-10-13[rubygems/rubygems] Remove unnecessary codeDavid Rodríguez
All supported rubygems versions implement this. https://github.com/rubygems/rubygems/commit/2130782ef6
2021-10-13[ruby/irb] Ignore parenthesis during completionKaíque Kandy Koga
Rename method https://github.com/ruby/irb/commit/619aecb412
2021-10-12Fix libraries under digestNobuyoshi Nakada
2021-10-12[ruby/digest] Avoid the constant redefinition warningAkinori MUSHA
The gem and bundle commands first load digest via openssl, so loading the digest gem would cause this warning every time one of these commands is run: ``` .../lib/ruby/gems/3.0.0/gems/digest-3.1.0/lib/digest.rb:11: warning: already initialized constant Digest::REQUIRE_MUTEX .../lib/ruby/3.0.0/digest.rb:7: warning: previous definition of REQUIRE_MUTEX was here ``` https://github.com/ruby/digest/commit/16172612d5
2021-10-12[ruby/digest] Place common parts in lib and engine specific parts under ↵Akinori MUSHA
ext/**/lib https://github.com/ruby/digest/commit/8d7496c3be
2021-10-12[ruby/reline] Check the result of GetConsoleScreenBufferInfoNobuyoshi Nakada
https://github.com/ruby/reline/commit/42edf7b3aa
2021-10-12[ruby/reline] Revert "Fix zero division when the screen width is not available"Nobuyoshi Nakada
This reverts commit 0dce9da083541f42c31822a91c72f339934c3986. https://github.com/ruby/reline/commit/f71471cdde
2021-10-12[ruby/reline] Fix zero division when the screen width is not availableNobuyoshi Nakada
https://github.com/ruby/reline/commit/0dce9da083
2021-10-11[ruby/reline] Rescue LoadError to require 'fiddle'aycabta
https://github.com/ruby/reline/commit/fe504bb6b9
2021-10-11[ruby/reline] Remove a comment for debugaycabta
https://github.com/ruby/reline/commit/5f3ccda3d5
2021-10-11[ruby/rdoc] Update SourceCodePro font filesaycabta
https://github.com/ruby/rdoc/commit/d3201d0d47
2021-10-11[ruby/irb] Add help about extra doc dir optionaycabta
https://github.com/ruby/irb/commit/5018f2cb99
2021-10-11[ruby/irb] Add --extra-doc-dir option to show doc dialogaycabta
https://github.com/ruby/irb/commit/3f79cb506f
2021-10-11[ruby/irb] Add periods to docaycabta
https://github.com/ruby/irb/commit/6330601629
2021-10-11[rubygems/rubygems] Show a warning in `bundle info` if gem has been deletedDavid Rodriguez
https://github.com/rubygems/rubygems/commit/ff86cd7dd2
2021-10-11[rubygems/rubygems] Show the exact name of the gem that was deletedDavid Rodriguez
If a non exact name (matched as a regexp) is passed to `bundle info`, these strings might not match. https://github.com/rubygems/rubygems/commit/831edf1edf
2021-10-11[ruby/reline] Suppress warning, "instance variable @ambiguous_width not ↵aycabta
initialized" https://github.com/ruby/reline/commit/368f7e2f78
2021-10-11[ruby/irb] Set default return_formataycabta
https://github.com/ruby/irb/commit/7ee15bc668
2021-10-10[ruby/irb] Revert "Optimize show_source command further"Takashi Kokubun
This reverts commit 27dd2867cda5c789efaa5078214ad2fd82adcebf. This is to fix the test I added. (I separated commits to test a new behavior of ruby-commit-hook) https://github.com/ruby/irb/commit/fe055d521a
2021-10-11[ruby/ipaddr] Fix include? and ipv4_mapped to allow drb tests to passJeremy Evans
include? should return false if comparing an IPv4 address to an IPv6 address. ipv4_mapped needs to set the correct netmask on the mapped addresses. https://github.com/ruby/ipaddr/commit/da22ef8e6c