aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* * lib/securerandom.rb: use OpenSSL::BN for performance improvement.glass2014-08-081-13/+21
| | | | | | * benchmark/bm_securerandom.rb: benchmark script. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/open-uri.rb: remove needless condition for old ruby version.hsbt2014-08-081-2/+1
| | | | | | * test/open-uri/test_open-uri.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/irb/init.rb: removed unreachable code.hsbt2014-08-081-6/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/drb/drb.rb: removed unreachable code.hsbt2014-08-081-10/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httpproxy.rb: remove needless conditionhsbt2014-08-081-2/+0
| | | | | | for old ruby version. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/open3.rb: avoid unnecessary write if stdin_data is empty.glass2014-08-071-8/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi.rb: remove needless condition for old ruby version.hsbt2014-08-071-2/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/set.rb (Set#replace): Check if an object given is enumerableknu2014-08-061-4/+4
| | | | | | | before clearing self. Reported by yui-knk. [GH-675] https://github.com/ruby/ruby/pull/675 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Implement Set#clone. [Fixes GH-661]knu2014-08-061-2/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb (Net::HTTP.proxy_uri): use initializer insteadnaruse2014-08-051-1/+3
| | | | | | of parser to handle IPv6 address. [Bug #9129] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http/requests.rb (Net::HTTP::Options::RESPONSE_HAS_BODY):naruse2014-08-051-1/+1
| | | | | | | OPTIONS requests may have response bodies. [Feature #8429] http://tools.ietf.org/html/rfc7231#section-4.3.7 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http/generic_request.rb (Net::HTTP::GenericRequest#exec):naruse2014-08-051-11/+2
| | | | | | | | | | | | handle req['host'] in update_uri. * lib/net/http/generic_request.rb (Net::HTTP::GenericRequest#update_uri): use req['host'] if it is explicitly set. Even if URI is given, it is already used for the initial value of req['host']. Therefore overwritten value should be respected. [Bug #10054] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http/generic_request.rbnaruse2014-08-052-14/+24
| | | | | | | | | | (Net::HTTP::GenericRequest#update_uri): handle scheme, host, and port to reflect connection to @uri. * lib/net/http.rb (Net::HTTP#begin_transport): move trivial handling to Net::HTTP::GenericRequest#update_uri. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http/generic_request.rbnaruse2014-08-051-9/+8
| | | | | | | (Net::HTTP::GenericRequest#initialize): optimize object allocation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove path_querynaruse2014-08-051-6/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/generic.rb (URI::Generic#normalize!): use String#empty?naruse2014-08-051-16/+12
| | | | | | | | * lib/uri/generic.rb (URI::Generic#path_query): optimized. * lib/uri/generic.rb (URI::Generic#to_s): optimized. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/http.rb (URI::HTTP#request_uri): optimized.naruse2014-08-051-5/+5
| | | | | | | decrease object allocation, and ensure always create at least one new object for return value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rubygems/util.rb: remove unused variablenobu2014-08-031-1/+1
| | | | | | | * lib/rubygems/util.rb (Gem::Util.silent_system): remove unused variable, to fix test failures with verbose flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mkmf.rb: try without -ObjC optionnobu2014-07-301-2/+2
| | | | | | | * lib/mkmf.rb (have_framework): try without -ObjC option first as MacPorts GCCs do not support it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/common.rb: [DOC] [Bug #9563] Recommend using URI.escapezzak2014-07-271-0/+3
| | | | | | | | before parsing a uri to avoid invalid characters. Reported by Evgeniy Serykh. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c: [DOC] Clarify %Y in strftime, which can accept any digitszzak2014-07-271-1/+1
| | | | | | | | and will output at least 4 digits as the year. Reported by Yury Trofimenko [Bug #8941] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/common.rb: [DOC] [Bug #10075] Clarify how URI.join argumentszzak2014-07-271-1/+1
| | | | | | | are handled by RFC3986, originall reported by John Feminella. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi/core.rb: remove unused variables.hsbt2014-07-2712-20/+8
| | | | | | | | | | | | | | | | * lib/erb.rb: ditto. * lib/mkmf.rb: ditto. * lib/net/http/response.rb: ditto. * lib/optparse/version.rb: ditto. * lib/prime.rb: ditto. * lib/racc/parser.rb: ditto. * lib/rexml/document.rb: ditto. * lib/rexml/dtd/dtd.rb: ditto. * lib/rexml/element.rb: ditto. * lib/rexml/functions.rb: ditto. * lib/rexml/parsers/xpathparser.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/irb.rb: [DOC] PROMPT_I cannot be nil, patch by @hgillane [ci skip]zzak2014-07-261-1/+1
| | | | | | | | Fixes documenting-ruby/ruby#37 https://github.com/documenting-ruby/ruby/pull/37 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/shell/command-processor.rb: remove unused variable.hsbt2014-07-264-4/+3
| | | | | | | | * lib/shell/system-command.rb: ditto. * lib/tmpdir.rb: ditto. * lib/uri/generic.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/weakref.rb: split executable code into sample directory.hsbt2014-07-261-11/+0
| | | | | | * sample/weakref.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/delegate.rb: split executable code into sample directory.hsbt2014-07-261-34/+0
| | | | | | * sample/delegate.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix encoding specnobu2014-07-251-1/+1
| | | | | | "UTF-8" is invalid encoding name in Emacs, use "utf-8" instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rubygems/util.rb: redirect optionsnobu2014-07-251-1/+12
| | | | | | | * lib/rubygems/util.rb (Gem.silent_system): use keyword options to redirect outputs instead of reopening global IOs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* specification.rb: fix leaked FDsnobu2014-07-251-1/+3
| | | | | | | * lib/rubygems/specification.rb (build_extensions): close redirection FDs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rubygems/util.rb: fix leaked FDsnobu2014-07-251-0/+2
| | | | | | * lib/rubygems/util.rb (silent_system): close duplicated IOs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remote_fetcher.rb: fix leaked FDsnobu2014-07-252-0/+8
| | | | | | | | * lib/rubygems/remote_fetcher.rb (request): close connections. * lib/rubygems/request.rb (close): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_gem_silent_ui.rb: fix leaked FDsnobu2014-07-251-0/+10
| | | | | | | | | | * lib/rubygems/user_interaction.rb (Gem::StreamUI#close): clean up IOs. * test/rubygems/test_gem_silent_ui.rb (TestGemSilentUI#teardown): fix leaked FDs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/benchmark.rb: split executable code into sample directory.hsbt2014-07-231-20/+0
| | | | | | * sample/benchmark.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/tempfile.rb: split executable code into sample directory.hsbt2014-07-231-10/+0
| | | | | | * sample/tempfile.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pstore.rb: split executable code into sample directory.hsbt2014-07-231-22/+0
| | | | | | * sample/pstore.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/drb/extserv.rb: remove duplicate code with sample direcotry.hsbt2014-07-221-30/+0
| | | | | | contributed from @vipulnsward. [fix GH-679] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* optparse.rb: getopts message improvementnobu2014-07-211-3/+5
| | | | | | | * lib/optparse.rb (getopts): print default values and descriptions in the help message. [fix GH-676] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix `Time.parse` for out of range arguments with an offsetnobu2014-07-192-3/+8
| | | | | | | | | | | | * lib/time.rb (Time#apply_offset): Guards against a `nil` return value from `Time.month_days` when offsetting date. Out of range values are then caught when `Time.utc` is called (as usual). Previously a `nil` return value from `Time.month_days` would have the `<` operator called on it, and raise `NoMethodError`. [fix GH-667] * lib/rdoc/parser/changelog.rb (RDoc#parse_entries): fix dirty hack. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix/eigenvalue_decomposition: Style fixmarcandre2014-07-181-3/+3
| | | | | | Patch by Gogo Tanaka [#10058] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Avoid using `and`.marcandre2014-07-181-2/+2
| | | | | | Patch by gogo tanaka [#10058] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/fileutils.rb: added missing options of FileUtils.touch by @Domon.hsbt2014-07-181-1/+1
| | | | | | [fix GH-669] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rbinstall.rb: respect DESTDIRnobu2014-07-151-2/+2
| | | | | | | | | * lib/rubygems.rb (Gem.install): pass optinos to Gem::DependencyInstaller. * tool/rbinstall.rb (gem): respect DESTDIR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rake.rb, lib/rake/*.rb: Upgrade to rake-10.3.2hsbt2014-07-1545-268/+604
| | | | | | | [fix GH-668] * test/rake/*.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb (Net::SMTP#data): enable buffering whilekosaki2014-07-111-4/+11
| | | | | | | | 'data' send for optimizing Net::SMTP#send_message. [ruby-dev:48329] [misc #9981] patch by Masahiro Tomita. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/abbrev.rb: remove executable.hsbt2014-07-111-11/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/fileutils.rb: handle ENOENT error with symlink targeted tohsbt2014-07-111-3/+9
| | | | | | non-exists file. [ruby-dev:45933] [Bug #6716] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Fix sign for cross_product [#9499]marcandre2014-07-111-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/irb/ruby-lex.rb: fix counting indent in identify_string_dvar.keiju2014-07-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/mkconfig.rb: remove not to require rbconfig/obsolete.rb.naruse2014-07-071-38/+0
| | | | | | * lib/rbconfig/obsolete.rb: removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e