summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2016-02-14mkmf.rb: Do not modify caller stringsnobu
* lib/mkmf.rb (with_{cpp,c,ld}flags): copy caller strings not to be modified, in append_{cpp,c,ld}flags respectively. [Fix GH-1246] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-13CIDR in no_proxynobu
* lib/uri/generic.rb (URI::Generic#find_proxy): support CIDR in no_proxy. [ruby-core:73769] [Feature#12062] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-13no_proxy with whitespaces and leading dotsnobu
* lib/uri/generic.rb (find_proxy): exclude white-spaces and allow for a leading dot in the domain name in no_proxy. [ruby-core:54542] [Feature #8317] The previous implementation wouldn't allow for white-spaces nor a leading dot in the domain name. The latter is described in the wget documentation as a valid case. By being more strict on the characters, which are counted to a domainname, we allow for white-spaces. Also, a possible leading dot will be handled gracefully. [Fix GH-285] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-12net/ftp.rb: NullSocket#closed?nobu
* net/ftp.rb: add NullSocket#closed? to fix closing not opened connection. [Fix GH-1232] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-09* lib/logger.rb: Remove block from Logger.add as it's not neededsonots
patch provided by Daniel Lobato GarcĂ­ [fix GH-1240] [Bug #12054] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-06ASCII-incompatible escapenobu
* lib/cgi/util.rb (escapeHTML, unescapeHTML): consider ASCII-incompatible encodings. [Fix GH-1239] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-06get rid of ruby-mode.el bugsnobu
* lib/optparse.rb: get rid of confusing ruby-mode.el of Emacs 24, - if-end expression inside an expression - a comma just followed by a bar git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-02* lib/rubygems/specification.rb: `coding` is affect only first line excepthsbt
shebang. * lib/rubygems/package.rb, lib/rubygems/package/*: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-01* lib/rubygems.rb, lib/rubygems/*, test/rubygems/*: Update rubygems-2.5.2.hsbt
It supports to enable frozen string literal and add `--norc` option for disable to `.gemrc` configuration. See 2.5.2 release notes for other fixes and enhancements. https://github.com/rubygems/rubygems/blob/a8aa3bac723f045c52471c7b9328310a048561e0/History.txt#L3 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-29erb.rb: fronzen-string-literal in comment [Fix GH-1229]nobu
* lib/erb.rb (ERB::Compiler#detect_magic_comment): allow fronzen-string-literal in comment as well as encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-29erb.rb: duplicated magic comments [Fix GH-1229]nobu
* lib/erb.rb (ERB#def_method): insert def line just before the first non-comment and non-empty line, not to leave duplicated and stale magic comments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-29erb.rb: frozen-string-literal safenobu
* lib/erb.rb (ERB#set_eoutvar): explicitly make mutable string as a buffer to make ERB work with --enable-frozen-string-literal. [ruby-core:73561] [Bug #12031] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-29* lib/net/http/header.rb: Warn nil variable on HTTP Header.hsbt
It caused to NoMethodError. [fix GH-952][fix GH-641] Patch by @teosz * test/net/http/test_httpheader.rb: Added test for nil HTTP Header. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-27Fix doc with default value with GH-523nobu
* lib/tempfile.rb (Tempfile#initialize): [DOC] the first parameter `basename` is optional and defaulted to an empty string since [GH-523]. [Fix GH-1225] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-25* lib/webrick/httpservlet/filehandler.rb: fix documentation for namespace.hsbt
[fix GH-1219][ci skip] Patch by @leafac git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-23Update documentation of CSV header converternobu
* lib/csv.rb: Update documentation of CSV header converter for r45498, [GH-575]. [Fix GH-1215] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-19* lib/shell.rb (Shell.debug_output_exclusive_unlock): removesho-h
because Mutex#exclusive_unlock was already deleted. [fix GH-1185] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-17* configure.in: improve ICC (Intel C Compiler) support.naruse
* configure.in (CXX): The name of icc's c++ compiler is `icpc`. * configure.in (warnings): Add `-diag-disable=2259` to suppress noisy warnings: "non-pointer conversion from "..." to "..." may lose significant bits". * configure.in (optflags): Add `-fp-model precise` like -fno-fast-math. * lib/mkmf.rb: icc supports -Werror=division-by-zero and -Werror=deprecated-declarations, but doesn't support -Wdivision-by-zero and -Wdeprecated-declarations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-14* lib/uri/generic.rb (URI::Generic#to_s): change encoding tonaruse
UTF-8 as Ruby 2.2/ by Koichi ITO <koic.ito@gmail.com> https://github.com/ruby/ruby/pull/1188 fix GH-1188 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-12* lib/forwardable.rb: Convert given accessors to String.sorah
r53381 changed to accept only Symbol or String for accessors, but there are several rubygems that pass classes (e.g. Array, Hash, ...) as accessors. Prior r53381, it was accepted because Class#to_s returns its class name. After r53381 given accessors are checked with define_method, but it accepts only Symbol or String, otherwise raises TypeError. def_delegator Foo, :some_method This change is to revert unwanted incompatibility. But this behavior may change in the future. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-10stdlib: avoid extra calls to eliminate "\n" from Base64normal
We may use the '0' (zero) to avoid adding the line feed. Furthermore, the '*' (asterisk) modifier is not needed for a single-element arrays. * ext/psych/lib/psych/visitors/yaml_tree.rb (visit_String): eliminate chomp * lib/net/http.rb (connect): eliminate delete * lib/net/http/header.rb (basic_encode): ditto * lib/net/imap.rb (authenticate): eliminate gsub (self.encode_utf7): shorten delete arg * lib/net/smtp.rb (base64_encode): eliminate gsub * lib/open-uri.rb (OpenURI.open_http): eliminate delete * lib/rss/rss.rb: ditto * lib/securerandom.rb (base64): ditto (urlsafe_base64): eliminate delete! * lib/webrick/httpauth/digestauth.rb (split_param_value): eliminate chop * lib/webrick/httpproxy.rb (do_CONNECT): eliminate delete (setup_upstream_proxy_authentication): ditto [ruby-core:72666] [Feature #11938] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-07Additional fix of r53450naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-07mkmf.rb: fix for ODE makenobu
* lib/mkmf.rb (create_makefile): get rid of placing @ at the beginning of replacement, which is the loop expansion mechanism from the OSF Development Environment (ODE) make. fix failures with bmake by r53448. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-07mkmf.rb: library installation messagesnobu
* lib/mkmf.rb (configuration, dummy_makefile, create_makefile): show library installation messages only when any files need to be updated. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-06optparse.rb: into kwdargnobu
* lib/optparse.rb (OptionParser#order!): add `into` optional keyword argument to store the results. [Feature #11191] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-05leakchecker.rb: remove temporary measurenobu
* lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler#watcher): make watcher thread restartable. * lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler#terminate): new method to terminate watcher thread. * test/lib/leakchecker.rb (LeakChecker#find_threads): revert r46941. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-03Fix defined? expressionsnobu
* lib/rubygems/security.rb (DIGEST_ALGORITHM, KEY_ALGORITHM): should check same name as the used constants. [ruby-core:72674] [Bug #11940] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-02Allow ERB subclass to add token easily. [Feature #11936]seki
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-01* lib/ostruct.rb: Fix case of frozen object with initializer.marcandre
Bug revealed by RubySpec [ruby-core:72639] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-01Adding a liberal_parsing option to CSV. Patch by Braden Anderson.jeg2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-31ostruct.rb: deferred accessorsnobu
* lib/ostruct.rb (freeze): define deferred accessors before freezing to get rid of an error when just reading frozen OpenStruct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-31* lib/ostruct.rb: Fix new_ostruct_member to correctly avoid redefinitionmarcandre
[#11901] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-30* lib/net/http/responses.rb: Added new response class for 451 status code.hsbt
* lib/net/http.rb: documentation for HTTPUnavailableForLegalReasons git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-30* lib/webrick/httpstatus.rb: Added HTTP 451 Status Code.hsbt
[fix GH-1167] Patch by @MuhammetDilmac https://tools.ietf.org/html/draft-tbray-http-legally-restricted-status-00 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-30forwardable.rb: adjust backtrace by tail callnobu
* lib/forwardable.rb (def_instance_delegator): adjust backtrace of method body by tail call optimization. adjusting the delegated target is still done by deleting backtrace. * lib/forwardable.rb (def_single_delegator): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-30Forwardable: Fix delegating to 'args' and 'block'nobu
* lib/forwardable.rb (def_instance_delegator) fix delegating to 'args' and 'block', clashing with local variables in generated methods. [ruby-core:72579] [Bug #11916] * lib/forwardable.rb (def_single_delegator): ditto. If you have a class that uses Forwardable to delegate a method to another object, and the method that returns the delegate object is called `args` or `block`, then Forwardable will fail to work. Here's a simple example: class ModelCreator extend Forwardable attr_reader :args def_delegator :args, :model_name def initialize(args) @args = args end end ModelCreator.new.model_name If you run the last line above, then you'll get: NoMethodError: undefined method `model_name' for []:Array This error occurs because `def_delegator` -- as it is written in Ruby -- uses metaprogramming to add methods to the class that will then delegate to the delegate object. So it's as if we had written: class ModelCreator extend Forwardable attr_reader :args def model_name(*args, &block) args.model_name(*args, &block) end def initialize(args) @args = args end end As you can see, `def_delegator` will not only forward the method call onto the delegate object, it will also forward any arguments provided as well. It is here that the bug arises: it splats all of the arguments into a variable which is called `args`, and because of how variable scope works in Ruby, it then attempts to call `model_name` on *this* variable and *not* our delegate object method. The fix is to call the delegate object method manually using `__send__`. (This assumes, of course, that the given receiver is, in fact, the name of a method and not the name of an instance variable, which is also a possibility.) We use `__send__` because the delegate object method could be private. So, that looks like this: def model_name(*args, &block) __send__(:args).model_name(*args, &block) end Because `def_delegators` and `delegate` use `def_delegator` internally, they also get this fix as well. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-29ostruct.rb: respond_to?nobu
* lib/ostruct.rb (OpenStruct): make respond_to? working on just-allocated objects for workaround of Psych. [ruby-core:72501] [Bug #11884] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-28Resolv::IPv6.create: avoid modifying frozen string literalnormal
* lib/resolv.rb (Resolv::IPv6.create): avoid modifying frozen * test/resolv/test_dns.rb (test_ipv6_create): test for above [Bug #11910] [ruby-core:72559] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-26* lib/xmlrpc/client.rb: Support SSL options in async methods ofkou
XMLRPC::Client. [Bug #11489] Reported by Aleksandar Kostadinov. Thanks!!! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-23[DOC] Fix typosa_matsuda
* benchmark.rb * getoptlong.rb * irb.rb * net/http.rb * net/http/header.rb * net/imap.rb * optparse.rb * pstore.rb * webrick.rb * xmlrpc.rb [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-22* lib/rdoc.rb: bump version to 4.2.1. It contains following fixes.hsbt
https://github.com/rdoc/rdoc/pull/340 https://github.com/rdoc/rdoc/pull/341 https://github.com/rdoc/rdoc/pull/367 https://github.com/rdoc/rdoc/pull/368 * lib/rdoc/*: ditto. * test/rdoc/*: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-21lib/net/http.rb (open_timeout): update default value in RDoc [ci skip]normal
[ruby-core:72413] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-20cgi/escape: Optimize CGI.escapeHTMLnobu
* cgi/escape/escape.c: Optimize CGI.escapeHTML for ASCII-compatible encodings. [Fix GH-1164] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-20* lib/erb.rb: revert r53123. It break compatibility like thor and rspec-rails.hsbt
We should try with Ruby 2.4 or 3.0. [Bug #11842][ruby-core:72374] * lib/rdoc/erb_partial.rb: ditto. * template/verconf.h.tmpl: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-19webrick/utils.rb: get rid of thread leak checkernobu
* lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler#initialize): use WEBrick::Utils::TimeoutHandler::Thread, which is ignored by LeakChecker#find_threads, instead of ::Thread to get rid of thread leak checker. since this TimeoutHandler is resident during tests because of Singleton, it waits for the next timeout if it has any schedules. in the case of nested timeouts, inner timeout does not cancel outer timeouts and then those schedules still remain. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-19csv.rb: Fix typo [ci skipnobu
* lib/csv.rb (CSV#initialize): [DOC] Fix double-word typo. [Fix GH-1161] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-18timeout.rb: watcher thread namenobu
* lib/timeout.rb (Timeout#timeout): set watcher thread name to caller location for debugging. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-18* lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler): To preventngoto
potential deadlocks, Queue is used to tell update of @timeout_info instead of sleep and wakeup. [Bug #11742] [ruby-dev:49387] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-18csv.rb: tail commasnobu
* lib/csv.rb (CSV::Converters, CSV::DEFAULT_OPTIONS): supply tail commas for further elements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-18csv.rb: fix typonobu
* lib/csv.rb (CSV#shift): fix typo. [See GH-1160] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e