summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2017-12-12Bump version to fileutils-1.0.0 as default gems.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12Ignore gemspec under the lib directory for documentation.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12Merge 1-16-stable branch of bundler.hsbt
It's rc version for bundler-1.16.1. I'm going to update it version after official release from bundler team. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-11Bump version to scanf-1.0.0 as default gems.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-11lib/pp.rb: remove alias for suppressing a redefinition warning.mame
Because there is now the same guard in prelude.rb (alias pp pp). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-11Bump version to cmath-1.0.0 as default gems.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-11bccwin is no longer supportedusa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-11depend on win32.h on Windowsusa
* lib/mkmf.rb (depend_rules): all objs should depend on win32.h on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-11Ignore to generate documentation for template files of bundler.hsbt
[Bug #14163][ruby-core:84141] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-08webrick: allow shutdown after StartCallbacknormal
We must to ensure the @status ivar is set to :Running before running StartCallback, otherwise Webrick::Server#stop will not change the @status to :Shutdown properly. Note: I have not been able to reproduce the original issue but understood at least part of the problem and fixed it with this commit. However, the original reporter (Peak Xu) was still able to reproduce the problem on 1.9.2 p180 on Windows, so I'm not sure what else might be going on. Ruby threading and synchronization primitives have changed a lot since 1.9.2, so maybe that was fixed elsewhere. * lib/webrick/server.rb: call StartCallback sooner [Bug #4841] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-08lib/pp.rb: no rdoc of alias to suppress a warningnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-08pp.rb: rdocnobu
* lib/pp.rb (pp): move pp alias before its rdoc, not to prevent parsing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05Bump version to rdoc-6.0.0.hsbt
There is no changes from rdoc-6.0.0.bebta4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-01Append "//" if empty host for file or postgres URInaruse
https://url.spec.whatwg.org/#url-serializing > Otherwise, if url’s host is null and url’s scheme is "file", append "//" to output. URL spec doesn't says anything about postgres, but assume the same thing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-01Replace Kernel#pp after PP class is defined.akr
Avoid a race condition which a context switch occur after replacing Kernel#pp but before defining PP class. Following patch, inserting sleep, makes this problem reproducible. ``` Index: lib/pp.rb =================================================================== --- lib/pp.rb (revision 60960) +++ lib/pp.rb (working copy) @@ -26,6 +26,7 @@ module Kernel end undef __pp_backup__ if method_defined?(:__pp_backup__) module_function :pp + sleep 1 # thread context switch end ## ``` With the above patch, "uninitialized constant Kernel::PP" can happen as as follows. ``` % ./ruby -w -Ilib -e ' t1 = Thread.new { Thread.current.report_on_exception = true pp :foo1 } t2 = Thread.new { Thread.current.report_on_exception = true sleep 0.5 pp :foo2 } t1.join rescue nil t2.join rescue nil ' #<Thread:0x000055dbf926eaa0@-e:6 run> terminated with exception: Traceback (most recent call last): 3: from -e:9:in `block in <main>' 2: from /home/ruby/tst2/ruby/lib/pp.rb:22:in `pp' 1: from /home/ruby/tst2/ruby/lib/pp.rb:22:in `each' /home/ruby/tst2/ruby/lib/pp.rb:23:in `block in pp': uninitialized constant Kernel::PP (NameError) :foo1 ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-01prelude.rb: suppress redefinition warningsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-01lib/pp.rb (Kernel#pp): Fix a race conditionmame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-30prelude.rb: Add Kernel#pp, a trigger for lib/pp.rbmame
[Feature #14123] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-28Merge rubygems-2.7.3.hsbt
http://blog.rubygems.org/2017/11/28/2.7.3-released.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-27* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-27Merge rdoc-6.0.0.beta4 from upstream.hsbt
It version applied `frozen_string_literal: true` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24Fix TOCTTOU and avoid to read existing unreadable filekazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24workspace.rb: one more spacenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24workspace.rb: fix SCRIPT_LINES__nobu
* lib/irb/workspace.rb (code_around_binding): `SCRIPT_LINES__` values are arrays of lines. get file and line at once. moved loop-invariant format string. join without extra strings by `$,`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24irb.rb: show source around binding.irb on startk0kubun
[Feature #14124] [ruby-dev:50319] [close GH-1764] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-22lib/set.rb: [DOC] remove empty commentsstomar
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-22set.rb: improve docs for Setstomar
* lib/set.rb: [DOC] add examples for Set#replace, add examples for creating a set from a hash with duplicates, simplify and fix style of some other examples, fix typos. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-20[DOC] Fix example result [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-20lib/matrix: Add hadamard_product/entrywise_product.marcandre
Based on a patch by Charley Hutchison. [GH-674] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-20lib/matrix: Add Matrix{.|#}combinemarcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-20lib/matrix: accept vectors in {h|v}stackmarcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-20lib/matrix: Add explicit coercion #to_matrixmarcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-17Fix typo in `Timeout` doc [ci skip]kazu
Author: yuuji.yaginuma <yuuji.yaginuma@gmail.com> https://github.com/ruby/ruby/pull/1760 [Fix GH-1760] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-17Add examples to Set documentation [ci skip]knu
GitHub PR: https://github.com/ruby/ruby/pull/1752 [Fix GH-1752] Submitted by: @Ana06 <anamma06@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-15tmpdir.rb: merged make_tmpname to createnobu
* lib/tmpdir.rb (Dir::Tmpname#create): try conversion of prefix and suffix just once before loop. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-09lib/matrix: Remove method catalog [doc] [ci-skip]marcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-09Merge rubygems-2.7.2.hsbt
This version fixes some setup commands. https://github.com/rubygems/rubygems/blob/01e797f6aa045fd09df7813d0b5448e3667172a9/History.txt#L3 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-07http.rb: improve docsstomar
* lib/net/http.rb: [DOC] fix typos and grammar git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-06Merge RubyGems 2.7.1.hsbt
* Fix `gem update --system` with RubyGems 2.7+. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-02rexml: improve docsstomar
* lib/rexml/entity.rb: [DOC] drop a pointless comment. Reported by Michael Gee (mikegee). [Fix GH-1736] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-02Merge release version of Rubygems 2.7.0.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-01Update bundled bundler to 1.16.0.hsbt
* lib/bundler, spec/bundler: Merge bundler-1.16.0. * common.mk: rspec examples of bundler-1.16.0 needs require option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-31webrick/httpresponse: minor cleanups to reduce memory usenormal
I never knew "format" was a global method alias for "sprintf"; so it was confusing to me. Normally, one would use "sprintf" since it's also available in many other languages, but Integer#to_s avoids parsing a format string so it's less bug-prone. Furthermore, favor string interpolation over String#<< since it is easier for the VM to optimize memory allocation (as in r60320). Interpolation also reduces method calls and memory overhead for inline method cache. Finally, ensure we clear all short-lived buffers for body responses. A similar change was made and measured for Net::* in r58840 showing a large memory reduction on some workloads. * webrick/httpresponse.rb (send_body_io): favor String#to_s, reduce method calls for String#<<, clear `buf' when done, avoid extra String#bytesize calls * (send_body_string): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-30webrick: support Proc objects as body responsesnormal
* lib/webrick/httpresponse.rb (send_body): call send_body_proc (send_body_proc): new method (class ChunkedWrapper): new class * test/webrick/test_httpresponse.rb (test_send_body_proc): new test (test_send_body_proc_chunked): ditto [Feature #855] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-29lib/set.rb: improve docs for Set#===stomar
* lib/set.rb: [DOC] improve description and examples for Set#===. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-26Host header should add branckets to IPv6 address [Bug #12642]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-25securerandom.rb: fix an example of choose [ci skip]nobu
* lib/securerandom.rb (Random::Formatter#choose): [DOC] fix an example, `n` is not optional. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24lib/ostruct.rb: Use frozen literals.marcandre
Patch adapted from Espartaco Palma. [GH-1714] [Bug #14000] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24lib/weakref: Remove incorrect example [DOC] [Bug #14031]marcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24net/http: use require_relative to reduce syscallsnormal
require_relative speeds up loading of files by reducing path lookups. On a clean install with RubyGems-enabled, "ruby -rnet/http -e exit" shows a reduction in failed open(2) syscalls from 410 to 350 (x86-64 GNU/Linux). I could not measure a time difference on my Linux-based machines, however this should be noticeable to users of other kernels with worse syscall and VFS performance than Linux. Further use of require_relative will reduce lookups in other places. * lib/net/http.rb: use require_relative [ruby-core:78285] [Feature #12973] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e