Граф коммитов

5637 Коммитов

Автор SHA1 Сообщение Дата
shugo 7be5169804 * lib/monitor.rb (mon_try_enter, mon_enter): should reset @mon_count
just in case the previous owner thread dies without mon_exit.
  [fix GH-874] Patch by @chrisberkhout

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-18 04:56:22 +00:00
normal 29a914ff2e lib/webrick/utils.rb: simplify by avoiding fcntl
IO#nonblock= and IO#close_on_exec= methods are simpler-to-use
and potentially more portable to for future OSes.
IO#nonblock= and IO#close_on_exec= are also smart enough to avoid
redundantly setting flags so a syscall may be avoided.

These methods could probably be removed entirely and inlined, but
it's unclear if there is 3rd-party code which relies on them.

* lib/webrick/utils.rb (set_non_blocking): use IO#nonblock=
* (set_close_on_exec): use IO#close_on_exec=
  [Feature #11136]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-17 08:22:11 +00:00
normal ce34a90fb5 lib/webrick/server.rb: avoid redundant fcntl call
Sockets are close-on-exec by default since Ruby 2.0, so it
is redundant to set it again.

* lib/webrick/server.rb (accept_client): avoid redundant fcntl call
  [Feature #11137]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-17 05:59:08 +00:00
nobu 228cfd02d5 cookie.rb: revert part of r50496
* lib/cgi/cookie.rb (CGI::Cookie#secure): revert part of r50496,
  which is irrelevant to GH-887, as the document states that the
  argument must be a boolean.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-15 08:59:33 +00:00
xibbar a4344cb5b4 * lib/cgi/cookie.rb: Implement HttpOnly flag for cookies.
[fix GH-887] Patch by @martinpovolny

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-14 23:27:01 +00:00
glass 0c14c3ab0b * ext/win32ole/win32ole_variant.c: fix typo "indicies".
the patch is from davydovanton <antondavydov.o at gmail.com>.
  [fix GH-892]

* lib/rubygems/indexer.rb: ditto.

* test/rubygems/test_gem_indexer.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-10 03:01:18 +00:00
shugo f954f0d840 * lib/net/imap.rb (body_ext_mpart): should work even if body-fld-dsp
is omitted.  [ruby-core:69093] [Bug #11128]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-08 06:46:18 +00:00
normal 84b012e02a stdlib: use IO#wait_*able instead of IO.select when possible
In case a process encounters high-numbered FDs, this allows
consistent performance on systems with ppoll support.
[ruby-core:35572]

* ext/socket/lib/socket.rb (connect_nonblock): use IO#wait_writable
* lib/drb/drb.rb (DRB::DRbTCPSocket#alive?): use IO#wait_readable
* lib/webrick/httpserver.rb (run): ditto
* lib/resolv.rb (request): ditto for single socket case
  [ruby-core:68943] [Feature #11081]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-06 20:30:43 +00:00
hsbt 9a2c3fd65e * lib/yaml.rb: fix typo. [ci skip][fix GH-890]
Patch by @miketheman

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-03 12:59:52 +00:00
nobu 5d071fe381 cookie.rb: trailing comma
* lib/cgi/cookie.rb: add trailing comma for further lines.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-29 13:22:34 +00:00
hsbt bd29cec6bb * lib/delegate.rb: fix a typo.
[fix GH-881][ci skip] Patch by @Zorbash

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-23 01:01:44 +00:00
shugo c8cb2598d1 * lib/net/imap.rb (move, uid_move): support the MOVE command defined
in RFC6851.  Patch by ojab ojab.
  [ruby-core:68960] [Feature #11077]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-22 09:43:55 +00:00
usa b528172eba * lib/mkmf.rb (MakeMakefile#configuration): DESTDIR should never affect
top_srcdir and builddir.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-20 07:52:10 +00:00
hsbt 325a50fc57 * ext/openssl/*: use license instead of licence.
[fix GH-876][ci skip] Patch by @davydovanton
* lib/net/https.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-20 03:55:09 +00:00
normal b90ad8a2f6 lib/net/*: use io/wait methods instead of IO.select
io/wait is expected to work on any platform where sockets are
supported.  io/wait methods uses fewer allocations and uses
ppoll internally under Linux for better performance on
high-numbered FDs.

[ruby-core:35572] describes the performance advantage of ppoll
on high-numbered FDs.

* lib/net/protocol.rb (rbuf_fill): use IO#wait_*able
* lib/net/http/generic_request.rb (wait_for_continue): ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-15 20:11:23 +00:00
nobu da4942c9d7 ostruct.rb: match Symbol itself
* lib/ostruct.rb (method_missing): get rid of creating temporary
  string object for method name, match Symbol itself.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-14 03:35:18 +00:00
hsbt 9829e91d34 * ext/json/json.gemspec, lib/rdoc/rdoc.gemspec: added gemspec directly.
* defs/default_gems, tool/rbinstall.rb: removed default_gems definition.
  it make simple installation for default gems.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12 09:12:15 +00:00
hsbt 2e4f0af00f * ext/json/*, test/json/*: Reverted r50231. Because it's not works with
cross-compile environment.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12 08:36:37 +00:00
hsbt e40ab5942b * lib/rubygems/test_case.rb: use explicitly exception class and reverted
to require JSON library for rubygems tests with Ruby 2.2.0 or earlier.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12 06:14:29 +00:00
hsbt 1cb2131153 * lib/rubygems/test_case.rb: fixed json load error for rubygems tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12 05:53:30 +00:00
nobu 42e149c9ad mkmf.rb: fix VC failures
* lib/mkmf.rb (xsystem): assume all warnings go to stderr but not
  stdout.  cl.exe always prints input file names.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-11 13:49:02 +00:00
hsbt cfaddc2a32 * ext/json/*, test/json/*, defs/default_gems: Gemify JSON library.
[fix GH-867][Feature #11057]
* test/ruby/test_extlibs.rb: removed json gem from existence extentions.
* gems/bundled_gems: added json gem into bundled gem.
* lib/rdoc/rubygems_hook.rb: ignored no json environment.
* lib/rubygems/test_case.rb, test/rubygems/*: ditto.
* lib/rdoc/test_case.rb, test/rdoc/*: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-11 11:14:36 +00:00
nobu 335cd8ab6a mkmf.rb: fix syntax errors
* lib/mkmf.rb (append_cppflags, append_cflags, append_ldflags):
  fix missing parentheses.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-11 02:01:57 +00:00
nobu bb96ab6fb6 mkmf.rb: methods to append flags
* lib/mkmf.rb (append_cppflags, append_cflags, append_ldflags):
  utility methods to append compiler options.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-11 02:00:02 +00:00
hsbt 600d527333 * lib/rdoc/text.rb: removed duplicated code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-10 23:22:28 +00:00
normal db2ff03bc0 lib/net/protocol.rb (rbuf_fill): avoid exception with read_nonblock
Exceptions are noisy in debug output and waste allocations.
Use "exception: false" introduced in 2.1 to return symbols for
common errors instead.

Follow-up commits will be prepared to reduce EOFError exceptions
to further quiet debug output and IO.select may be replaced by
io/wait methods if available to reduce allocations.

[ruby-core:68787] [Feature #11044]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-10 21:05:29 +00:00
nobu f168f23f82 mkmf.rb: werror of try_cppflags
* lib/mkmf.rb (try_cppflags): set werror flag as same as cflags
  and ldflags.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-10 13:36:59 +00:00
nobu aceb11dff4 mkmf.rb: fix werror option
* lib/mkmf.rb (try_compile): pass the given werror flag to try_do
  to check if stderr is empty.
* lib/mkmf.rb (try_cflags, try_ldflags): default werror to true.
* win32/Makefile.sub (WERRORFLAG): remove useless option.  VC does
  not make warnings of unknown command option an error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-10 13:29:23 +00:00
nobu 54264f534a ext/date: reject unknown compiler option
* ext/date/extconf.rb: check warnings.
* lib/mkmf.rb (try_cflags): pass options to try_compile.
* win32/Makefile.sub (WERRORFLAG): make unknown command line
  options an error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-10 02:44:12 +00:00
nobu e98d4947b7 ignore rake load error
rake is not available until installation now, so skip rake
packagetask even if it cannot load until it is actually needed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-09 06:06:56 +00:00
hsbt c4ee0df8ba * lib/rake/*: Gemify rake [fix GH-862][Feature #11025]
* test/rake/*: ditto.
* tool/rbinstall.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-04 12:31:31 +00:00
naruse 58835a94ef * lib/net/http.rb (edit_path): use path which is absolute ftp url
on using ftp_proxy.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-03 23:18:20 +00:00
nobu 676fe089bd fileutils.rb: fix error message
* lib/fileutils.rb (FileUtils#mv): show the exact target path in
  the error message instead of the destination parent directory
  name.  patched by João Britto <jabcalves AT gmail.com> at
  [ruby-core:68706].  [Bug #11021]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-01 00:59:14 +00:00
nobu be6ef3502e test_case.rb: $make before $MAKE
* lib/rubygems/test_case.rb (make_command): try unusual $make
  before usual $MAKE.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-30 00:50:47 +00:00
nobu d4fc094391 test_case.rb: use $MAKE
* lib/rubygems/test_case.rb (make_command): usually $MAKE is
  defined but not $make.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-29 22:35:45 +00:00
nobu 9da887cf57 json_index.rb: check zlib
* lib/rdoc/generator/json_index.rb (generate_gzipped): do nothing
  unless zlib is available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-23 05:15:15 +00:00
hsbt 7d75a78604 * lib/webrick/server.rb: Fix regression bug in WEBrick's
:DoNotReverseLookup config option implementation.
  [fix GH-731] Patch by @vais
* test/webrick/test_do_not_reverse_lookup.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-16 08:43:28 +00:00
nobu 05c29680e5 fix env leaks
* lib/rubygems/test_case.rb (setup, teardown): fix
  environment variable change leaks.

* test/cgi/update_env.rb: ditto.

* test/rake/test_rake_application_options.rb (setup, teardown):
  ditto.

* test/rake/test_rake_file_utils.rb (setup, teardown): ditto.

* test/rubygems/test_gem_request.rb (setup): add https_proxy.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-12 14:57:33 +00:00
nobu 84b5bb9802 normalize.rb: remove redundant hash
* lib/unicode_normalize/normalize.rb (UnicodeNormalize): REGEXP_K
  matches only single chars which are keys of KOMPATIBLE_TABLE, so
  string in nfkd_one is always single char and one of the key of
  KOMPATIBLE_TABLE, that is that the default proc of NF_HASH_K only
  copies a pair in KOMPATIBLE_TABLE.  therefore NF_HASH_K is a
  part of KOMPATIBLE_TABLE always, and just redundant.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11 03:56:44 +00:00
akr ab0a64e1c8 * lib/webrick/server.rb: Invoke setup_shutdown_pipe in start method
instead of listen method.
  [ruby-core:68476] [Bug #10956] Reported by Shintaro Kojima.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10 11:05:21 +00:00
marcandre b81950f480 * lib/matrix.rb: Add Vector#round. Patch by Jordan Stephens.
[Fixes GH-802]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-05 23:45:42 +00:00
nobu 418d915f7b remove GEM directories at exit
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-05 05:07:39 +00:00
akr 9ee9812dad * lib/time.rb (strptime): Support %s.%N.
[ruby-core:68301] [Bug #10904] Patch by Sadayuki Furuhashi.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-01 00:12:48 +00:00
hsbt d9c32d62a0 * lib/rubygems: Update to RubyGems 2.4.6 and HEAD(800f2e6).
Fixed #1159, #1171, #1173 on rubygems/rubygems
* test/rubygems: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-27 13:00:45 +00:00
hsbt b89e894399 * lib/rake: Update to rake (9237e74), typo fix and remove needless
private syntax.
* test/rake: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-27 11:55:47 +00:00
gogotanaka 0c3a0d6588 * lib/cmath.rb (log): raise ArgumentError when more than 2 arguments
are passed. [ruby-core:66143] [Bug #10487]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-24 23:53:21 +00:00
marcandre 0c4631b880 * lib/uri: [doc] Update common.rb [ci-skip] [fixes GH-838]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-24 18:09:10 +00:00
marcandre ecf33043b8 * lib/matrix.rb: [Doc] Fix Vector multiplication documentation [ci-skip]
[Fixes GH-837]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-22 20:22:31 +00:00
nobu 466bd05fda resolv.rb: fix equality
* lib/resolv.rb (Resolv::DNS::Resource#==, #hash): elements
  returned by Kernel#instance_variables are Symbols now.
  [ruby-core:68128] [Bug #10857]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-17 02:47:19 +00:00
hsbt f6b9a0feaf * hash.c: Added docs to explain that #include? and #member? do not
check member equality
* lib/set.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-17 01:47:28 +00:00