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

6685 Коммитов

Автор SHA1 Сообщение Дата
nobu c8d66b5d82 stringio.c: check range
* ext/stringio/stringio.c (strio_ungetc): raise RangeError instead
  of TypeError at too big value, as well as IO#ungetc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-21 03:15:57 +00:00
nobu 853ab8662f stringio.c: check character code
* ext/stringio/stringio.c (strio_ungetc): check if the character
  code is valid in the encoding.  reported by Ahmad Sherif
  (ahmadsherif) at https://hackerone.com/reports/209593.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-21 03:15:56 +00:00
stomar d8bf178531 date_core.c: fix error in DateTime docs
* ext/date/date_core.c: [DOC] fix format string for DateTime#rfc3339.
  Reported by Andreas Rayo Kniep.  [ruby-core:68418] [Bug #10936]

* ext/date/date_core.c: [DOC] ditto for DateTime#iso8601 and
  DateTime#xmlschema; other small improvements.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-19 09:51:29 +00:00
normal cad4591086 remove branches in dmark and dfree GC callbacks
dmark and dfree callbacks are never called in gc.c for NULL
DATA_PTR values, not even for zombie objects.

* compile.c (ibf_loader_mark): remove branch for pointer validity
* compile.c (ibf_loader_free): ditto
* cont.c (cont_free): ditto
* cont.c (fiber_free): ditto
* dir.c (dir_free): ditto
* ext/stringio/stringio.c (strio_mark): ditto
* proc.c (binding_free): ditto
* thread_sync.c (mutex_free): ditto
* vm.c (thread_free): ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-17 19:59:56 +00:00
mrkn 65285fbdb8 bigdecimal: version 1.3.2
Import bigdecimal version 1.3.2.  The full commit log is here:

  https://github.com/ruby/bigdecimal/compare/v1.3.1...v1.3.2

This fixes [ruby-core:79603] [Bug #13232]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-13 06:03:18 +00:00
nobu 22d842ded0 rbconfig/sizeof: remove VPATH
* ext/rbconfig/sizeof/depend: remove VPATH for `make dist`.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-09 06:44:57 +00:00
normal f1de2e0070 ext/socket/raddrinfo.c (addrinfo_mark): avoid needless branch
gc.c (gc_mark_children, case T_DATA) does not use
the dmark function pointer if DATA_PTR is NULL

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-09 03:49:47 +00:00
nobu f861c4d40e rbconfig/sizeof: nmake VPATH
* ext/rbconfig/sizeof/depend: prepend VPATH for out-of-place build
  using nmake.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-09 03:31:53 +00:00
naruse a298301baa suppress warning: shadowing outer local variable - e
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-07 05:19:00 +00:00
hsbt 48240306b1 Fix up r57788, Function is removed at readline-6.3.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-07 04:46:46 +00:00
hsbt cf2a68662a Avoid to warning of clang with -Wincompatible-pointer-types.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-06 09:10:21 +00:00
nobu f96c171ebc readline.c: fix waiting fucntion
* ext/readline/readline.c (getc_body): use
  rb_w32_wait_events_blocking in block region.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-06 08:10:20 +00:00
nobu 1ec805727e readline.c: fix type
* ext/readline/readline.c (getc_body): fix variable type, and
  extract _get_osfhandle.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-04 05:13:18 +00:00
nobu d2e61b41f5 zlib for mingw
* ext/zlib/extconf.rb: fix building zlib for mingw, and for
  cross-compiling.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-03 09:27:27 +00:00
nobu 9da188550c zlib: clean zlib
* ext/zlib/extconf.rb: clean zlib libraries generated in the
  place.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-01 05:44:37 +00:00
nobu a0da6f0dfe clean gems
* Makefile.in (clean-ext): clean gem directories too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-28 08:22:00 +00:00
hsbt 7e0aaf3ac3 Added initial gemspec for SDBM module.
[Feature #13261]

  * doc/*.rdoc: Move SDBM entry to default gem section.
  * ext/sdbm/sdbm.gemspec: first gemspec.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-28 07:45:54 +00:00
stomar 9fe1433575 date_core.c: expand docs for Date shifting
* ext/date/date_core.c: [DOC] expand docs for Date shifting

  * add examples for Date#>> and Date#<< that clarify some edge cases
  * add examples for Date#next_year and Date#prev_year
  * add cross references to Date#>> and Date#<<

  [ruby-core:79584] [Bug #13225]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-27 18:26:22 +00:00
hsbt 55c13218d9 Added initial gemspec for Etc module.
[Feature #13256]

  * doc/*.rdoc: move Etc module to default gem section.
  * ext/etc/etc.gemspec: first gemspec.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-27 09:20:39 +00:00
nobu 06c1272677 ext/socket/extconf.rb: fix a typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-27 05:58:31 +00:00
suke 8feb977918 ext/win32ole/win32ole.c(ole_initialize): avoid to fail in Windows nano server.
This is experimental. Thanks to mwrock, Ethan Brown.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-25 22:28:22 +00:00
hsbt 0f081edf7e gem name should be the downcase.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-24 06:50:43 +00:00
hsbt a3697ddaa9 Added initial gemspec for GDBM module.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-24 06:48:55 +00:00
hsbt e795dfe2de Update psych-2.2.3
* It's only typo fix for CRuby.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-24 06:32:48 +00:00
nobu c9447082ec Revert r57690 except for read_nonblock
https://github.com/ruby/ruby/pull/1527#issuecomment-281867551

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-23 02:40:17 +00:00
nobu d0cf19d9ed [DOC] mark up literals
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-23 02:11:16 +00:00
nobu 95a476c859 [DOC] keyword argument _exception_
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-23 02:00:28 +00:00
nobu 53b4bf3134 socket.rb: [DOC] fix nonblock methods
* ext/socket/lib/socket.rb (BasicSocket#recv_nonblock): fix
  exception class and symbol.

* ext/socket/lib/socket.rb (BasicSocket#recvmsg_nonblock): ditto.

* ext/socket/lib/socket.rb (Socket#recvfrom_nonblock): fix the
  method name.

* ext/socket/lib/socket.rb (UDPSocket#recvfrom_nonblock): both.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-23 01:54:13 +00:00
nobu d5eef0301a [DOC] {read,write}_nonblock with exception: false
Update docs to reflect EOF behavior change of read_nonblock and
write_nonblock when using `exception: false`.

[Fix GH-1527]
Author:    Russell Davis <russell-stripe@users.noreply.github.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-23 01:15:27 +00:00
nobu ea940cc4dc regparse.c: initialize return values
* regparse.c (parse_char_class): initialize return values before
  depth limit check.  returned values will be freed in callers
  regardless the error.  [ruby-core:79624] [Bug #13234]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20 09:46:12 +00:00
nobu aded420d32 resolv9x.rb: fix typo
* ext/win32/lib/win32/resolv9x.rb (WsControl): fix missing close
  parenthesis at r22724.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-14 12:34:11 +00:00
kazu b2345fece0 ext/objspace: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-12 04:31:25 +00:00
nobu 01134984ef symbol/init.c: ID value
* ext/-test-/symbol/init.c (sym_pinneddown_p): return ID value or
  nil for debugging.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-12 02:48:28 +00:00
nobu 0da70829f1 fiddle/depend: build-libffi
* ext/fiddle/depend (build-libffi): get rid of making $(LIBFFI_A)
  a sole target, which may be empty when installed libffi is
  found.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-11 10:33:05 +00:00
mrkn 70f772c3ef bigdecimal: version 1.3.1
Import bigdecimal version 1.3.1.  The full commit log is here:

  https://github.com/ruby/bigdecimal/compare/v1.3.0...v1.3.1

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-10 13:23:58 +00:00
hsbt 5d906263ab Added initial gemspec for Fcntl module.
[Feature #13206]

  * ext/fcntl/fcntl.gemspec: initial commit.
  * doc/maintainers.rdoc, doc/standard_library.rdoc: Move Fcntl module
    to Default gems section.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-10 09:41:15 +00:00
nobu 35533d0346 fiddle: fix $(SUBMAKE_PRE)
* ext/fiddle/extconf.rb: fix $(SUBMAKE_PRE) to chdir to
  $(LIBFFI_DIR) instead of $(@D), since $(LIBFFI_A) is not
  underneath libffi but under .libs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-10 04:24:08 +00:00
nobu ef004b1ad6 openssl: fix broken openssl check
* ext/openssl/deprecation.rb: check for broken OpenSSL only on mac
  OS.  [ruby-core:79475] [Bug #13200]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-10 03:59:55 +00:00
nobu 9101875d30 openssl: fix broken openssl check
* ext/openssl/extconf.rb: check for broken OpenSSL only on mac OS.
  [ruby-core:79475] [Bug #13200]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-10 03:58:02 +00:00
nobu f9694cdb67 extmk.rb: split notes
* ext/extmk.rb: split notes and echo per lines, for multiple lines
  messages.  [ruby-core:79475] [Bug #13200]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-10 03:58:01 +00:00
nobu 3c06d3a6bd fiddle: jobserver for libffi
* ext/fiddle/depend (libffi): use $(MAKE) explicitly for recursive
  make, so that jobserver works.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-09 12:08:56 +00:00
hsbt f72e43a417 Added initial gemspec for DBM module.
[Feature #13201]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-08 10:05:13 +00:00
kazu 026ded9384 {ext,test}/zlib: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-07 12:49:57 +00:00
hsbt 2507e9000e Fix a required ruby version on gemspec of gemified libraries.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-07 07:14:22 +00:00
hsbt 4a02608b3c Added initial gemspec for StringScanner class.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-07 07:14:21 +00:00
kazu a4fde3b60c {ext,test}/strscan: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-06 13:23:39 +00:00
nobu bcad5a51d7 date_core.c: [DOC] revise docs [ci skip]
* fix malformed rdoc for Date#today, Date._strptime,
  and DateTime._strptime
* add code examples for Date#<< and Date#>> to demonstrate
  that different dates can result in the same return value
* use Date::ITALY in call-seq instead of only ITALY
* fix some copy/paste mistakes where Date should be DateTime
* fix various errors and grammar
* fix cross references and formatting

[ruby-core:79433] [Bug #13193]
Author:    Marcus Stollsteimer <sto.mar@web.de>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-06 07:34:13 +00:00
kazu e3300dce82 {ext,test}/ripper: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-05 07:54:32 +00:00
kazu 411083a9a6 ext/pty: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-04 06:49:00 +00:00
hsbt 367acdaa30 Added initial gemspec for zlib module.
[Feature #13186]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-03 12:39:04 +00:00
nobu bb3d794929 ensured.c: fix conflict
* ext/-test-/exception/ensured.c (exc_raise): get rid of conflict
  with raise(2) in the standard.  [ruby-core:79371] [Bug #13176]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-03 06:48:02 +00:00
nobu 2aaca10505 eval.c: hide internal objects
* eval.c (rb_ensure): veil internal exception objects not to leak
  in ensure functions.  [ruby-core:79371] [Bug #13176]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-03 06:23:34 +00:00
kazu 5eb5afb67a ext/fcntl: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02 15:12:29 +00:00
hsbt c3d27b5979 Added initial gemspec for Date module.
[Feature #13183]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02 08:38:54 +00:00
nobu c373866444 escape.c: check argument
* ext/cgi/escape/escape.c (optimized_unescape): check
  accept_charset encoding argument.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02 08:02:36 +00:00
tenderlove ef76e3cfb6 Add IMEMO type to heap dump output.
IMEMO objects have many types.  Without this change, we cannot see what
types of IMEMO objects are being used when dumping the heap.  Adding the
type to the IMEMO object will allow us to gather statistics about IMEMO
objects being used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31 17:46:51 +00:00
rhe 8795838fcb openssl: import v2.0.3
Import Ruby/OpenSSL 2.0.3. Only bugfixes. The full commit log since
2.0.2 (imported at r57146) can be found at:

  https://github.com/ruby/openssl/compare/v2.0.2...v2.0.3

----------------------------------------------------------------
Corey Bonnell (1):
      Fix for ASN1::Constructive 'each' implementation

Kazuki Yamaguchi (10):
      Fix build with static OpenSSL libraries on Windows
       ([ruby-core:78878] [Bug #13080])
      Merge pull request #96 from CBonnell/master
      Merge branch 'topic/windows-static-linking-without-pkg-config' into maint
      appveyor.yml: update OpenSSL version to 1.0.2j
      buffering: fix typo in doc
      test/envutil: fix assert_raise_with_message
      x509: fix OpenSSL::X509::Name#eql?
       ([ruby-core:79310] [Bug #13170])
      ruby-openssl-docker: update versions of Ruby and OpenSSL
      .travis.yml: test with Ruby 2.4
      Ruby/OpenSSL 2.0.3

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31 10:08:22 +00:00
shyouhei 8ad7429644 make FIXNUM_MAX visible from Ruby
Because our tests now have several places where FIXNUM_MAX is needed,
we decided to provide it along with several other constants.

	* template/limits.c.tmpl: new file, defining RbConfig::Limits

	* ext/rbconfig/sizeof/depend (limits.c): rule to generate limits.c

	* test/-ext-/num2int/test_num2int.rb: use RbConfig::Limits

	* bootstraptest/test_insns.rb: ditto.

	* .gitignore: ignore new generated file.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30 10:12:18 +00:00
kazu b9d8758e26 {ext,test}/etc: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-29 01:35:23 +00:00
nobu b2c9c82cb7 extmk.rb: remove clean and install mode
* ext/extmk.rb (parse_args): remove clean and install mode, now
  configure mode only.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-28 05:31:25 +00:00
nobu c3df88eca6 extmk.rb: remove direct build mode
* ext/extmk.rb (parse_args): --command-output is now mandatory.
  remove direct build mode.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-28 05:23:39 +00:00
kazu 886e805799 {ext,test}/dbm: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-28 04:36:08 +00:00
nobu 658fc3dd26 exts.mk.tmpl: ruby names
* template/exts.mk.tmpl: extract configured ruby names.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-28 01:43:29 +00:00
nobu 3d5facc48f extmk.rb: fix for static-linked-ext
* ext/extmk.rb (extmake): fix up r57424 for static-linked-ext.
  separate maybestatic argument from basedir which is given always
  now.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-27 08:05:06 +00:00
kazu 8edb6ce4f7 {ext,test}/date: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-27 00:29:21 +00:00
nobu 72ad0019ba Parallel gem configuration
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-26 08:19:34 +00:00
nobu 17b748df2b Parallel ext configuration
* ext/configure-ext.mk: configure each directories underneath ext
  in parallel.

* template/exts.mk.tmpl: then collect the results.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-23 02:50:23 +00:00
nobu ea87854c52 extinit.c.tmpl: drop after dot
* template/extinit.c.tmpl: drop rest from the first dot in the
  base name of a feature is ignored since r30464.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-23 02:19:00 +00:00
nobu eb411fad21 extmk.rb: EXTINITS to sub make
* ext/extmk.rb: pass EXTINITS to sub make.  if the template for
  extinit.c is modified after extinit.c got compiled, extinit.c
  will be re-generated together with ruby.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-23 02:18:59 +00:00
nobu 78b95b49f8 template/extinit.c.tmpl
* template/extinit.c.tmpl: separate from ext/extmk.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-22 12:50:36 +00:00
nobu ef31fedd09 extmk.rb: ignore generated sources
* ext/extmk.rb (extract_makefile): ignore generated source files
  not to reconfigure when in-place build.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-20 10:59:47 +00:00
normal a34f9c7e9a basicsocket (rsock_bsock_send): do not truncate return value
send(2) and sendto(2) syscalls return `ssize_t', use the
proper type and macro for converting to a Numeric VALUE.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-16 21:42:05 +00:00
nobu b4a55c1cad console.c: unpaired size
* ext/io/console/console.c (console_set_winsize): reject unpaired
  pixel size.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-07 23:02:29 +00:00
nobu 5b856ee1a6 console.c: OOB access
* ext/io/console/console.c (console_set_winsize): fix
  out-of-bounds access.  [ruby-core:79004] [Bug #13112]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-07 22:52:03 +00:00
nobu 70db4f6ecd win32/registry.rb: registry type names
* ext/win32/lib/win32/registry.rb (Win32::Registry#read): show
  registry type names instead of numeric values.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-04 11:06:16 +00:00
nobu 3047144ac2 win32/resolv.rb: ad hoc workaround
* ext/win32/lib/win32/resolv.rb (Win32::Resolv::SZ): an ad hoc
  workaround for broken registry.  SearchList and other registry
  values must be REG_SZ, or Windows ignores anything in those
  values otherwise.  [ruby-dev:49924] [Bug #13081]
  https://github.com/rubygems/rubygems/issues/1700

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-04 08:21:14 +00:00
tenderlove ed2abc4362 Add `full` option to `ObjectSpace.dump_all`
The `full` option includes all slots (even `T_NONE`) in the JSON output.
This is to help with debugging heap fragmentation.

Here is an example usage:

```ruby
File.open('heap.json', 'w') do |f|
  ObjectSpace.dump_all(output: f, full: true)
end
```

The `heap.json` file contains all slots, including empty slots.

[Feature #13001] [ruby-core:78468]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-03 22:42:10 +00:00
nobu 9e1a9858c8 memory_status.c: support old Mac OS
* ext/-test-/memory_status/memory_status.c (read_status): use
  TASK_BASIC_INFO instead of MACH_TASK_BASIC_INFO on old Mac OS.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-25 14:32:29 +00:00
rhe b7458f20ff openssl: import v2.0.2
Import Ruby/OpenSSL 2.0.2. This release contains only bugfixes. The full
commit log since 2.0.1 (imported at r57041) can be found at:

  https://github.com/ruby/openssl/compare/v2.0.1...v2.0.2

----------------------------------------------------------------
Kazuki Yamaguchi (5):
      ssl: check for SSL_CTX_clear_options()
      Rename functions in openssl_missing.c
      ssl: use SSL_SESSION_get_protocol_version()
      pkey: allow instantiating OpenSSL::PKey::PKey with unsupported key type
      Ruby/OpenSSL 2.0.2

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-22 01:43:41 +00:00
mrkn bd288dcc8b bigdecimal: version 1.3.0
Import bigdecimal version 1.3.0.  The full commit log is here:

  https://github.com/ruby/bigdecimal/compare/v1.3.0.pre.2...v1.3.0

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21 15:35:29 +00:00
nobu 0adce99357 rdoc for r57126 [ci skip]
* ext/zlib/zlib.c: [DOC] update as keyword arguments.
  [Feature #13020]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-20 17:15:37 +00:00
naruse ba568c0ea3 Zlib.gzip uses kwargs instead of argc [Feature #13020]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-20 16:02:21 +00:00
hsbt f9ee1409fa Update psych-2.2.2
* It fixed only JRuby dependency issue.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-15 11:00:40 +00:00
naruse 1d51f427ff fix Zlib.gzip/gunzip document
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-11 06:13:02 +00:00
mrkn 42a677c895 bigdecimal: version 1.3.0.pre.2
Import bigdecimal version 1.3.0.pre.2.  The full commit log is here:

  https://github.com/ruby/bigdecimal/compare/v1.3.0.pre...v1.3.0.pre.2

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-10 08:56:05 +00:00
nobu 30540c5675 stringio.c: chomp CR
* ext/stringio/stringio.c (strio_getline): chomp CR not only LF,
  as well as String#chomp.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-10 08:54:40 +00:00
nobu f46a137746 zlib.c: replace with substring
* ext/zlib/zlib.c (zstream_discard_input): replace with unread
  portion substring, not modifying the input buffer directly.
  [ruby-core:78567] [Bug #13021]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-10 08:26:40 +00:00
rhe 0c83666c6c openssl: import v2.0.1
Import Ruby/OpenSSL 2.0.1. The full commit history since 2.0.0 (imported
at r56946) can be found at:

  https://github.com/ruby/openssl/compare/v2.0.0...v2.0.1

This release contains only bug fixes. Note, the first two commits since
v2.0.0 are already imported at r56953 to make Travis and RubyCI green.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-10 08:12:02 +00:00
mrkn 8e1293730e bigdecimal: import version 1.3.0.pre
Import bigdecimal version 1.3.0.pre.  The full commit log of this
changes can be found at:

    https://github.com/ruby/bigdecimal/compare/5c43a9e...v1.3.0.pre

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-10 07:49:15 +00:00
kazu adc9c71fbe Fix document of gunzip and gzip [ci skip]
- fix a typo (`GzipReadr` -> `GzipReader`)
- `Zlib::GzipReader.new` does not take block
- fix encoding

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-10 02:16:55 +00:00
naruse 583b6dc33c Zlib.gzip and Zlib.gunzip [Feature #13020]
Encode and Decode gzip data without creating files.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-09 22:45:39 +00:00
nobu 35623d779d stringio: chomp option
* ext/stringio/stringio.c (strio_getline): implement chomp option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-03 11:01:25 +00:00
rhe 95dbfe0dfc openssl: import fixes from upstream
Import the following two commits from upstream:

  commit 72126d6c8b88abd69c3565fc3bbbd5ed1e401611
  Author: Kazuki Yamaguchi <k@rhe.jp>
  Date:   Thu Dec 1 22:27:03 2016 +0900

      pkey: check existence of EVP_PKEY_get0()

      EVP_PKEY_get0() did not exist in early OpenSSL 0.9.8 series. So define
      ourselves if needed.

  commit 94a1c4e0c5705ad1e9a4ca08cacaa6cba8b1e6f5
  Author: Kazuki Yamaguchi <k@rhe.jp>
  Date:   Thu Dec 1 22:13:22 2016 +0900

      test/test_cipher: fix test with OpenSSL 1.0.1 before 1.0.1d

      Set the authentication tag before the AAD when decrypting.

      Before OpenSSL commit 96f7fafa2431 ("Don't require tag before ciphertext
      in AESGCM mode", 2012-10-16, at OpenSSL_1_0_1-stable branch, included in
      OpenSSL 1.0.1d), the authentication tag must be set before any calls of
      EVP_CipherUpdate().

They should fix build on CentOS 5 and Ubuntu 12.04 respectively.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-01 04:42:10 +00:00
nobu e680bfb1ab ossl.c: cast
* ext/openssl/ossl.c (ossl_pem_passwd_cb): cast to int.  it's safe
  because len does not exceed int max_len.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-30 14:54:09 +00:00
rhe aab0d67a1f openssl: import v2.0.0
Import Ruby/OpenSSL 2.0.0. The full commit history since 2.0.0 beta.2
(imported at r56098) can be found at:

  https://github.com/ruby/openssl/compare/v2.0.0.beta.2...v2.0.0

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-30 14:41:46 +00:00
hsbt 0a5abaf745 Fixed error with `make install`
rbinstall.rb couldn't load "psych/versions".

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-30 14:24:12 +00:00
hsbt 48e251df47 Update psych-2.2.1
It fixed segmentation fault related with GC.
  https://github.com/ruby/psych/pull/296

  and removed deprecated code of Ruby 1.8.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-30 13:55:02 +00:00
nobu 65e27c8b13 parse.y: ambiguous parentheses
* parse.y (parser_yylex): warn ambiguous parentheses after a space
  in method definitions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 10:47:43 +00:00
normal 0514a74794 socket: use symbol proc for IO#close loops
Made possible by r56795, this reduces human and byte code size.

* ext/socket/lib/socket.rb (self.ip_sockets_port0,
  self.tcp_server_sockets_port0,
  self.tcp_server_sockets,
  self.udp_server_sockets): use symbol proc

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-21 23:50:25 +00:00
nobu 4ba9778461 win32ole.c: suppress warnings
* ext/win32ole/win32ole.c (g_ole_initialized): compare with 0
  instead of cast to get rid of pointer-to-int-cast warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-20 06:53:39 +00:00
usa 935f825592 get rid of test failures introduced at r56848
* ext/rubyvm/lib/forwardable/impl.rb: remove an unused variable definition to
  get rid of a warning.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-20 06:19:05 +00:00
nobu 2283d14cc9 forwardable/impl.rb
* lib/forwardable/impl.rb (_valid_method?, _compile_method):
  extract to separate implementation specific part.
  [ruby-core:78138] [Bug #12938]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-20 02:12:48 +00:00
suke 173f7fdcc5 * ext/win32ole/win32ole.c: independent of libgcc_s_seh-1.dll [Bug #12959]
Thanks to Tsuyoshi Morita for bug report.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-19 23:51:49 +00:00
yui-knk d723bfc00e objspace.c:: indent [ci skip]
* ext/objspace/objspace.c (memsize_of_m): adjust indent of comments.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-18 11:05:20 +00:00
nobu 5bb84ec7d8 extmk.rb: removed compiled? method [ci skip]
* ext/extmk.rb (compiled?): removed.

* ext/win32/extconf.rb: try to install libraries regardless
  fiddle.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-18 04:34:26 +00:00
nobu d3d9903dc2 readline.c: str_subpos
* ext/readline/readline.c (str_subpos): make string instance only
  if necessary.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-17 11:52:11 +00:00
hsbt b252126d6d Fix a typo.
18d13b1df0

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-16 03:02:42 +00:00
hsbt f5046e7b07 Fixed regression of typo fix.
Picked from upstream: 66fb7fb775
[ci skip][ruby-dev:49879][Bug #12942]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-16 02:51:26 +00:00
nobu 6394b63db9 socket.rb: remove closed checks
* ext/socket/lib/socket.rb: remove unnecessary closed checks,
  close on closed socket no longer raises an exception.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-15 01:39:11 +00:00
nobu bfcb3fb3be socket.rb: kwargs
* ext/socket/lib/socket.rb (connect_{from,to}, connect): let use
  keyword arguments.

* ext/socket/lib/socket.rb (Socket.tcp): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-14 07:53:31 +00:00
svn ce48ef2ba7 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-14 00:40:06 +00:00
hsbt 4e70bae2bc Update bundled psych to 2.2.0.
* Merge libyaml-0.1.7 for bundled-libyaml option.
 * Update canonical url to https://github.com/ruby/psych.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-14 00:40:04 +00:00
nobu 48d5a921ab readline: remove dependency on internal.h
* ext/readline/depend: remove dependency on internal.h.

* ext/readline/readline.c (readline_s_delete_text): use
  rb_enc_str_new_static instead of rb_setup_fake_str not to depend
  on internal.h.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-13 02:11:07 +00:00
ko1 75775157ea Introduce table improvement by Vladimir Makarov <vmakarov@redhat.com>.
[Feature #12142]
	See header of st.c for improvment details.

	You can see all of code history here:
	<https://github.com/vnmakarov/ruby/tree/hash_tables_with_open_addressing>

	This improvement is discussed at
	<https://bugs.ruby-lang.org/issues/12142>
	with many people, especially with Yura Sokolov.

	* st.c: improve st_table.

	* include/ruby/st.h: ditto.

	* internal.h, numeric.c, hash.c (rb_dbl_long_hash): extract a function.

	* ext/-test-/st/foreach/foreach.c: catch up this change.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-07 00:45:00 +00:00
naruse 8d2e44c270 rename to noatime?
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-05 08:59:42 +00:00
naruse 0fe34211f2 * ext/-test/file/fs.c (get_atime_p): Updating of file access times
is enabled or not.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-05 08:23:57 +00:00
akr 9373c5efb9 Pathname#empty? implemented.
* ext/pathname/pathname.c (Pathname#empty?): New method.
  [ruby-core:76404] [Feature#12596] Proposed by John Backus.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-05 03:29:08 +00:00
nobu e4257036ec pathname.c: unnormalized Fixnum value
* ext/pathname/pathname.c (path_hash): fix unnormalized Fixnum
  value bug on mingw/mswin.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-04 01:51:18 +00:00
mrkn 03c9bc2b1d Import from ruby/bigdecimal repository
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-03 12:46:22 +00:00
nobu 9e75488ac8 internal.h: RB_OBJ_BUILTIN_TYPE
* internal.h (RB_OBJ_BUILTIN_TYPE): special-const safe
  BUILTIN_TYPE.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-28 06:58:19 +00:00
rhe 4530a8ef7f socket: fix rdoc of UDPSocket#recvfrom_nonblock
* ext/socket/lib/socket.rb (UDPSocket#recvfrom_nonblock): [DOC] Remove
  a false statement "If _maxlen_ is omitted, its default value is
  65536." maxlen, the first parameter, cannot be omitted as the method
  signature indicates. This hasn't changed ever since it was first
  implemented.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-27 05:58:35 +00:00
nobu 4e44f6ef86 [DOC] replace Fixnum with Integer [ci skip]
* numeric.c: [DOC] update document for Integer class.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-26 06:11:23 +00:00
kazu 6f22fc6b70 fix hexdigest [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-20 13:18:52 +00:00
svn 10035cb4bc * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-20 07:57:31 +00:00
hsbt 814c1adec7 * ext/digest/digest.c: Add documentation for Digest.
[Feature #10452][ruby-core:66001][ci skip]
  * remove HMAC from list of digest algorithms,
  * add MD5 in list of digest algorithms,
  * add information about writing a C digest implementation using Digest::Base,
  * add documentation for Digest::Base public methods.
* ext/digest/md5/md5init.c: add examples for MD5.
* ext/digest/rmd160/rmd160init.c: add examples for Digest::RMD160.
* ext/digest/sha1/sha1init.c: add examples for Digest::SHA1.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-20 07:57:30 +00:00
nobu 1bbe67f5f6 memory_status.c: Win32 API
* ext/-test-/memory_status/memory_status.c (read_status): use
  Win32 GetProcessMemoryInfo API.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-08 01:54:24 +00:00
nobu f0e1d72316 memory_status.c: system call
* ext/-test-/memory_status/memory_status.c: get memory sizes by
  mach task_info system call.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-08 01:34:27 +00:00
suke 5dd01af28f ext/win32ole/*.c, ext/win32ole/win32ole.h: use RB_INT2FIX instead of
INT2FIX, and so on.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-07 10:24:56 +00:00
hsbt 631f8da938 * ext/readline/extconf.rb: Update error message with correct words.
[fix GH-1453][ci skip] Patch by @magikid

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-06 02:38:18 +00:00
hsbt 4043565023 * ext/socket/*.c: Add proper require for example to work.
[fix GH-1378][ci skip] Patch by @schneems

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-05 03:57:32 +00:00
kazu 30e856f589 fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-04 12:24:40 +00:00
nobu cc80f139cd bigdecimal.c: more precision
* ext/bigdecimal/bigdecimal.c (BigDecimal_div2): need more room
  for precision to round.  [ruby-core:77475] [Bug #12805]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-04 00:55:15 +00:00
nobu 1ae50df95d bigdecimal.c: fix debug print
* ext/bigdecimal/bigdecimal.c (VpFree, VpInit): fix debug print
  format.

* ext/bigdecimal/bigdecimal.c (VPrint): fix argument description,
  and embed NaN, Infinity, and zero in the format.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-04 00:55:14 +00:00
nobu 011e45c6ec use rb_locale_str_new
* ext/readline/readline.c (readline_char_is_quoted): use
  rb_locale_str_new with the length.  [Feature #12659]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-03 12:39:10 +00:00
nobu 402f042689 rl_char_is_quoted_p
* ext/readline/readline.c (readline_s_set_quoting_detection_proc):
  support rl_char_is_quoted_p.  [Feature #12659]
* ext/readline/readline.c (readline_s_get_quoting_detection_proc):
  ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-03 08:20:07 +00:00
nobu 5d8acb25a7 readline.c: mustbe_callable
* ext/readline/readline.c (mustbe_callable): extract to check a
  given argument to be callable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-03 07:10:49 +00:00
usa 9c9c46e5a3 * ext/date/date_parse.c (date_zone_to_diff): it's nonsence and really
harm that to use unary minus operator with unsigned value.
  get rid of test failures introduced at r56312.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-01 14:12:34 +00:00
nobu 4bb7485464 date_parse.c: str_end_with
* ext/date/date_parse.c (str_end_with): extract to tell if a
  string ends with the other string.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-01 09:00:05 +00:00
nobu d618f7b79a zonetab.h: use strncmp
* ext/date/zonetab.h (zonetab): use strncmp.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-01 08:52:43 +00:00
nobu c943e59603 date_parse.c: refactor
* ext/date/date_parse.c (date_zone_to_diff): refactor without
  allocating strings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-01 08:52:42 +00:00
nobu 0b149ab5f3 strscan.c: minl
* ext/strscan/strscan.c (minl): extract to reduce repeated S_LEN.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-28 05:11:22 +00:00
nobu 604ae2e151 strscan.c: use S_RESTLEN
* ext/strscan/strscan.c (strscan_getch, strscan_peek),
  (strscan_rest_size, inspect2): use S_RESTLEN consistently.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-28 05:11:20 +00:00
rhe e6e66094f9 stringio.c: fix signed integer overflow
* ext/stringio/stringio.c (strio_seek): Avoid signed integer overflow.
  It's not harmful in practice here, but is still undefined behavior.

* ext/stringio/stringio.c (strio_extend): Check that the new length does
  not exceed LONG_MAX. This fixes the invalid write on the overflow.

* test/stringio/test_stringio.rb (test_write_integer_overflow): Add a
  test case for the above fix in strio_extend().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-26 07:24:55 +00:00
nobu 97a016ac8a install extra libraries
* ext/extmk.rb (extract_makefile, extmake, configuration): store
  extra libraries to be installed.
* tool/rbinstall.rb (ext-arch): install extra libraries.
* ext/zlib/extconf.rb: install zlib if built.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-24 13:26:21 +00:00
nobu 0cc169d1de fid typos [ci skip]
* fix typos, "a" before "Integer" to "an".  [Fix GH-1438]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-24 02:28:25 +00:00
nobu b212dd6674 zlib: no checks [ci skip]
* ext/zlib/extconf.rb: no feature checks when building zlib from
  the source, assume it is recent.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-23 14:18:41 +00:00
nobu f5f8f3ce37 zlib: fix directory [ci skip]
* ext/zlib/extconf.rb: fix directory to install zlib library.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-23 14:18:39 +00:00
nobu 21255071d8 zlib: try zlib source
* ext/zlib/extconf.rb: try building zlib from the source if
  exists.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-22 06:35:28 +00:00
nobu 958c04898c dlntest.dll: move
* ext/-test-/win32/dln/{depend,extconf.rb} (dlntest.dll): make
  under the extension directory, instead of the top directory.

* test/-ext-/win32/test_dln.rb (test_check_imported): explicit
  PATH environment variable to load the DLL.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-22 06:35:27 +00:00
nobu cf6ca2d8b2 objspace_dump.c: dc is no longer used [ci skip]
* ext/objspace/objspace_dump.c (heap_i): remove no longer used
  variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-17 09:22:26 +00:00