* 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
* 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
* 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
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
* 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
* 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
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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
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
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
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
* 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
* 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
* 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
* 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
* 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
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
* 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
* 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
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
* 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
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
* 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
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
- 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
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
* 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
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
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
* 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
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
* 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
* 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
* 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
* 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
* 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
[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
* 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
* 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
[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
* 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
* 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
* 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
* 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
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
* 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
* 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
* 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
* 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
* 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
* 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