summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2018-08-25drb: close graceful shutdown pipe before socketnormal
Closing a listen socket while entering select(2) may trigger IOError or even deadlock because another thread may give the file descriptor to another file description; meaning the kernel can wait on the wrong description. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25drb: simplify shutdown pipe close logicnormal
IO#close is idempotent, so we don't need to waste bytecode to check or nil it at shutdown time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-20Update link to Email address specificationkazu
The current link leads to 404, I updated to the actual one. [Fix GH-1929] [ci skip] Author: Nikolay Belov <travelerspb@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-14webrick/httpauth/htgroup.rb (flush): avoid unnecessary unlinknormal
Based on patch by akr [ruby-core:88477], use Tempfile.create to avoid unnecessary unlink call. Unlike akr's original patch, this does not change the return value of flush. Thanks-to: Tanaka Akira <akr@fsij.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-09Include the input in the message when raising InvalidAddressErrorknu
[Feature #5987] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-08net/http, net/ftp: fix session resumption with TLS 1.3rhe
When TLS 1.3 is in use, the session ticket may not have been sent yet even though a handshake has finished. Also, the ticket could change if multiple session ticket messages are sent by the server. Use SSLContext#session_new_cb instead of calling SSLSocket#session immediately after a handshake. This way also works with earlier protocol versions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-07Support old versions of Ruby with FrozenError.hsbt
They should work separatedly from Ruby core repository. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-07Fallback to load version constant for ruby core repository.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-07Removed needless date attribute from gemspec of default gems.hsbt
They are assigned automatically when pushing gem file to rubygems.org. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-31Add same comment to thwait.gemspec like other gemspec at r64145kazu
[ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-31Try to load version file of github repository at first.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-31Fixed inconsistency gemspec location.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-31Fixed inconsistency file structure for gemspec.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-28Fix filename in comment [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-28fix range check for Hangul jamo trailers in Unicode normalizationduerst
* lib/unicode_normalize/normalize.rb: Fix the range check for trailing Hangul jamo characters in Unicode normalization. Different from leading or vowel jamos, where LBASE and VBASE are actual characters, a value equal to TBASE expresses the absence of a trailing jamo. This fix is technically correct, but there was no bug because the regular expressions in lib/unicode_normalize/tables.rb eliminate jamos equal to TBASE from normalization processing. * test/test_unicode_normalize.rb: Add preventive test test_no_trailing_jamo based on https://github.com/python/cpython/commit/d134809cd3764c6a634eab7bb8995e3e2eff14d5 just for the case we ever get a regression. This closes issue #14934, thanks to MaLin (Lin Ma) for reporting. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-27Escape debug output in InvalidURIError exceptions.tenderlove
Co-authored-by: Brad Landers <brad@bradlanders.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-26lib/ostruct: Remove unnecessary `__send__`marcandre
Patch by yuuji.yaginuma [Fix GH-1890] Since `remove_method` is public. Ref: https://bugs.ruby-lang.org/issues/14133 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-26webrick: Support bcrypt password hashingnormal
This adds a password_hash keyword argument to WEBrick::HTTPAuth::Htpasswd#initialize. If set to :bcrypt, it will create bcrypt hashes instead of crypt hashes, and will raise an exception if the .htpasswd file uses crypt hashes. If :bcrypt is used, then instead of calling BasicAuth.make_passwd (which uses crypt), WEBrick::HTTPAuth::Htpasswd#set_passwd will set the bcrypt password directly. It isn't possible to change the make_passwd API to accept the password hash format, as that would break configurations who use Htpasswd#auth_type= to set a custom auth_type. This modifies WEBrick::HTTPAuth::BasicAuth to handle checking both crypt and bcrypt hashes. There are commented out requires for 'string/crypt', to handle when String#crypt is deprecated and the undeprecated version is moved to a gem. There is also a commented out warning for the case when the password_hash keyword is not specified and 'string/crypt' cannot be required. I think the warning makes sense to nudge users to using bcrypt. I've updated the tests to test nil, :crypt, and :bcrypt values for the password_hash keyword, skipping the bcrypt tests if the bcrypt library cannot be required. [ruby-core:88111] [Feature #14940] From: Jeremy Evans <code@jeremyevans.net> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-25Fixes the File::CREAT logger documentationtenderlove
Co-Authored-By: Matias Korhonen <matias@kiskolabs.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-25Promote Mutex_m to Default gems.hsbt
* lib/mutex_m.gemspec: Added initial gemspec. * lib/mutex_m.rb: Added Mutex_m::VERSION for gemspec. * tool/sync_default_gems.rb: Support Mutex_m. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-25Promote Exception2MessageMapper to Default gems.hsbt
* lib/e2mmap.gemspec: Added initial gemspec. * lib/e2mmap/version.rb: Added Exception2MessageMapper::VERSION for gemspec. * tool/sync_default_gems.rb: Support Exception2MessageMapper. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-25Promote ThWait to Default gems.hsbt
* lib/thwait.gemspec: Added initial gemspec. * lib/thwait/version.rb: Added ThWait::VERSION for gemspec. * tool/sync_default_gems.rb: Support ThWait. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-25Promote Forwardable to default gems.hsbt
* lib/forwardable.rb: Added Forwardable::VERSION and re-use it. * lib/forwardable/forwardable.gemspec: Added initial gemspec. * tool/sync_default_gems.rb: Support forwaradable repository. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-24time.rb: yday supportnobu
* lib/time.rb (Time.make_time): added yday support. [ruby-core:87545] [Bug #14860] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-23Revert previous commit and split lib/tracer/version.rbkazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-23Revert partially to avoid test error temporarilykazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-20Promote Shell library to default gems.hsbt
* doc/*: Move entry to default gems category from standard library. * lib/shell/*: Added `Shell::VERSION` and re-used it with @RELEASE_VERSION. * test/shell/test_command_processor.rb: added missing require for test library. * tool/sync_default_gems.rb: Support shell library. We need to ignore shellwords.rb when syncing shell* files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-20Fixed wrong library patFixed wrong library pathhhsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-20Do not use `git ls-files` for file listing.kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-20Promote Tracer to default gems.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-17Promote Synchronizer to default gems.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-14webrick/httpresponse: set_redirect requires a valid URInormal
Prevents response splitting and HTML injection attacks in poorly-written applications which blindly pass along user input in redirects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-09Promote irb library to default gems.hsbt
* lib/irb/irb.gemspec: init. * lib/irb/version.rb: Set @RELEASE_VERSION value to IRB::VERSION for gemspec. * doc/*.rdoc: Move IRB entry to default gems category. * tool/sync_default_gems.rb: Add irb support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-04Fallback to Digest::SHA512kazu
`Gem::Package::TarWriter#add_file_signed` expects to fallback to `Digest::SHA512`, and `digest.respond_to? :name` or not. So lib/rubygems/security.rb should use same logic for `Gem::Security::DIGEST_ALGORITHM` and `Gem::Security::DIGEST_NAME`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-01lib/.document: add csvktsj
lib/csv.rb was divided into lib/csv/*. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-28Fix typo of file path [ci skip]a_matsuda
Patch by: yuuji.yaginuma <yuuji.yaginuma@gmail.com> https://github.com/ruby/ruby/pull/1900 [Fix GH-1900] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-24lib/prime.rb: remove unused methodsmame
This change removes TrialDivision#cache, TrialDivision#primes, and TrialDivision#primes_so_far. TrialDivision class is undocumented officially, so this class is used only internally. Yugui san moved prime library from mathn to prime in 2008, and then she might forget to delete these methods. A patch from @shio-phys. https://github.com/ruby/prime/pull/4 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-20Thread is always provided at current ruby version.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-19lib/drb/extservm.rb (service): do not return `false'normal
invoke_service_command may set entries in @servers to `false', making it incompatible with the intended use of the safe navigation operator. This caused occasional DRb test failures, but they were hidden with automatic retry. [ruby-core:87524] [Bug #14856] Fixes: r53111 ("use safe navigation operator") commit 059c9c1cf371e049c7481c78b76e9620da52757f [GH-1142] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-14Get rid of warnings of test/specusa
* lib/net/http/exceptions.rb: revert a part of r63590. to deprecate Net::ProtoServerError seems to be wrong. see [ruby-core:87488] [Feature#14688] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-12lib/securerandom.rb: improve docsstomar
* lib/securerandom.rb: [DOC] add alphanumeric example to module docs. [Fix GH-1812] From: Justin Bull <me@justinbull.ca> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-08write_timeout doc upates [skip ci]naruse
From: MSP-Greg <MSP-Greg@users.noreply.github.com> fix https://github.com/ruby/ruby/pull/1885 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-08Removed needless extension for require.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-07Promote Matrix to default gems.hsbt
The upstream repository is https://github.com/ruby/matrix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-07Fix typos [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-07Promote OpenStruct to default gems.hsbt
Upstream repository is https://github.com/ruby/ostruct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-06Use `Net::HTTPClientException` instead of `Net::HTTPServerException`naruse
`Net::HTTPServerException` has been deprecated since r63590. [Bug #14688] And `net/http/responses.rb` uses the deprecated constant, so Ruby warns of the deprecation. Example: ```bash $ ruby -r net/http -e '' /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/net/http/responses.rb:22: warning: constant Net::HTTPServerException is deprecated ``` This change suppresses the warning. From: Masataka Pocke Kuwabara <kuwabara@pocke.me> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-06Add Net::HTTPClientException [Bug #14688]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-06fix r63587naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-06fix r63587 with temporal patch to pass the tests. please re-fix it.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e