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

8217 Коммитов

Автор SHA1 Сообщение Дата
Olle Jonsson 59411b0b36
[ruby/zlib] gemspec: Remove unused files
Remove the list of executables.

https://github.com/ruby/zlib/commit/6a70725b8e
2021-04-20 21:19:41 +09:00
Olle Jonsson 749aad280f
[ruby/gdbm] gemspec: Set executables to the empty list
This gem exposes zero executables.

https://github.com/ruby/gdbm/commit/d51cf47f65
2021-04-20 21:19:41 +09:00
Olle Jonsson cc8d0e7cbf
[ruby/dbm] gemspec: add README & LICENSE
https://github.com/ruby/dbm/commit/c86b94b781
2021-04-20 21:19:41 +09:00
Hiroshi SHIBATA 3fdc58c08b
[ruby/date] Bump version to 3.1.1
https://github.com/ruby/date/commit/e574cc9048
2021-04-20 20:46:03 +09:00
卜部昌平 6413dc27dc dependency updates 2021-04-13 14:30:21 +09:00
Tom Stuart 8b2f2a707d [ruby/openssl] Use #ifdef consistently for HAVE_RB_EXT_RACTOR_SAFE
We previously used a mix of both `#if` and `#ifdef`, but the latter is
more reliable because it will still work if the macro is undefined.

https://github.com/ruby/openssl/commit/e4a622e67e
2021-03-31 18:05:08 +09:00
Tom Stuart 5ab2625243 [ruby/openssl] Fix OpenSSL::Engine build on Debian
On Debian 9 (“stretch”) the `OPENSSL_NO_STATIC_ENGINE` macro is not
defined, which causes all the `#if HAVE_ENGINE_LOAD_…` directives to
fail with `error: 'HAVE_ENGINE_LOAD_…' is not defined, evaluates to 0
[-Werror,-Wundef]` while building TruffleRuby.

We can accomplish the same thing with `#ifdef`, which (of course) works
fine when the `HAVE_ENGINE_LOAD…` macros are also undefined.

Upstreamed from oracle/truffleruby#2255, which fixed
oracle/truffleruby#2254.

https://github.com/ruby/openssl/commit/65e2adf1ac
2021-03-31 18:05:08 +09:00
Kazuki Yamaguchi e2bf3659e1 [ruby/openssl] pkcs7: keep private key when duplicating PKCS7_SIGNER_INFO
ASN1_dup() will not copy the 'pkey' field of a PKCS7_SIGNER_INFO object
by design; it is a temporary field kept until the PKCS7 structure is
finalized. Let's bump reference counter of the pkey in the original
object and use it in the new object, too.

This commit also removes PKCS7#add_signer's routine to add the
content-type attribute as a signed attribute automatically. This
behavior was not documented or tested. This change should not break any
working user code since the method was completely useless without the
change above.

https://github.com/ruby/openssl/commit/20ca7a27a8
2021-03-31 18:05:07 +09:00
aycabta 66d2fc7989 Enclose the code that was accidentally a link in "tt" 2021-03-31 15:18:52 +09:00
Nobuyoshi Nakada 94d564077c
Text files should end with a newline 2021-03-30 23:41:21 +09:00
Nobuyoshi Nakada 989e22f394
[ruby/io-console] bump up to 0.5.9
https://github.com/ruby/io-console/commit/302e86a28c
https://github.com/ruby/io-console/commit/0690862526
2021-03-28 23:42:38 +09:00
Kenichi Kamiya 9af57eeed6
[ruby/pathname] Fix segfault of Pathname#split
Fix segmentation fault of Pathname#split when File.split returns
non array value [Bug #17755]

https://github.com/ruby/pathname/commit/e29b49e3b1
https://github.com/ruby/pathname/commit/1db7479a74
2021-03-28 14:04:10 +09:00
Jean Boussier 7e8a9af9db rb_enc_interned_str: handle autoloaded encodings
If called with an autoloaded encoding that was not yet
initialized, `rb_enc_interned_str` would crash with
a NULL pointer exception.

See: https://github.com/ruby/ruby/pull/4119#issuecomment-800189841
2021-03-22 21:37:48 +09:00
Nobuyoshi Nakada 3260602fa3
Adjusted indents [ci skip] 2021-03-17 09:49:17 +09:00
Sorah Fukumori cf831f4918
zlib: fix Gzip{Writer,Reader}.new fails with a O_TMPFILE file 2021-03-17 02:16:27 +09:00
Kazuki Yamaguchi 1eb6d8aa63 [ruby/openssl] bn: check -1 return from BIGNUM functions
Although the manpage says that BIGNUM functions return 0 on error,
OpenSSL versions before 1.0.2n and current LibreSSL versions may return
-1 instead.

Note that the implementation of OpenSSL::BN#mod_inverse is extracted
from BIGNUM_2c() macro as it didn't really share the same function
signature with others.

https://github.com/ruby/openssl/commit/9b59f34345
2021-03-16 19:37:06 +09:00
Nobuyoshi Nakada 1ad2224773 [ruby/openssl] Fixed the results of OpenSSL::Timestamp::Response#failure_info
Made stored values `Symbol`s instead of `ID`s.

Fixes https://bugs.ruby-lang.org/issues/17625

Co-Authored-By: xtkoba (Tee KOBAYASHI) <xtkoba+ruby@gmail.com>

https://github.com/ruby/openssl/commit/f2d004679a
2021-03-16 19:37:06 +09:00
Jeremy Evans e2ce383044 [ruby/openssl] Enhance TLS 1.3 support on LibreSSL 3.2/3.3
This defines TLS1_3_VERSION when using LibreSSL 3.2+.  LibreSSL 3.2/3.3
doesn't advertise this by default, even though it will use TLS 1.3
in both client and server modes.

Changes between LibreSSL 3.1 and 3.2/3.3 broke a few tests, Defining
TLS1_3_VERSION by itself fixes 1 test failure.  A few tests now
fail on LibreSSL 3.2/3.3 unless TLS 1.2 is set as the maximum version,
and this adjusts those tests.  The client CA test doesn't work in
LibreSSL 3.2+, so I've marked that as pending.

For the hostname verification, LibreSSL 3.2.2+ has a new stricter
hostname verifier that doesn't like subjectAltName such as
c*.example.com and d.*.example.com, so adjust the related tests.

With these changes, the tests pass on LibreSSL 3.2/3.3.

https://github.com/ruby/openssl/commit/a0e98d48c9
2021-03-16 19:37:06 +09:00
Kazuki Yamaguchi 4756ac00b7 [ruby/openssl] pkey/ec: remove OpenSSL::PKey::EC::Group.new(ec_method) form
The form created an empty EC_GROUP object with the specified EC_METHOD.
However, the feature was unfinished and not useful in any way because
OpenSSL::PKey::EC::Group did not implement wrappers for necessary
functions to set actual parameters for the group, namely
EC_GROUP_set_curve() family.

EC_GROUP object creation with EC_METHOD explicitly specified is
deprecated in OpenSSL 3.0, as it was apparently not intended for use
outside OpenSSL.

It is still possible to create EC_GROUP, but without EC_METHOD
explicitly specified - OpenSSL chooses the appropriate EC_METHOD for
the curve type. The OpenSSL::PKey::EC::Group.new(<:GFp|:GF2m>, p, a, b)
form will continue to work.

https://github.com/ruby/openssl/commit/df4bec841f
2021-03-16 19:16:11 +09:00
Kazuki Yamaguchi d47210b113 [ruby/openssl] ssl: remove SSL::SSLContext#tmp_ecdh_callback
The underlying API SSL_CTX_set_tmp_ecdh_callback() was removed by
LibreSSL >= 2.6.1 and OpenSSL >= 1.1.0, in other words, it is not
supported by any non-EOL versions of OpenSSL.

The wrapper was initially implemented in Ruby 2.3 and has been
deprecated since Ruby/OpenSSL 2.0 (bundled with Ruby 2.4) with explicit
warning with rb_warn().

https://github.com/ruby/openssl/commit/ee037e1460
2021-03-16 19:16:11 +09:00
Kazuki Yamaguchi 945ed40862 [ruby/openssl] ssl: retry write on EPROTOTYPE on macOS
Errno::EPROTOTYPE is not supposed to be raised by SSLSocket#write.
However, on macOS, send(2) which is called via SSL_write() can
occasionally return EPROTOTYPE. Retry SSL_write() so that we get a
proper error, just as ext/socket does.

Reference: https://bugs.ruby-lang.org/issues/14713
Reference: https://github.com/ruby/openssl/issues/227

https://github.com/ruby/openssl/commit/2e700c80bf
2021-03-16 19:16:11 +09:00
Kazuki Yamaguchi c46b1f0bec [ruby/openssl] x509store: update rdoc for X509::Store and X509::StoreContext
Add more details about each method, and add reference to OpenSSL man
pages.

https://github.com/ruby/openssl/commit/02b6f82c73
2021-03-16 19:16:11 +09:00
Kazuki Yamaguchi 62d889c857 [ruby/openssl] x509store: fix memory leak in X509::StoreContext.new
The certificate passed as the second argument was not properly free'd
in the error paths.

https://github.com/ruby/openssl/commit/9561199b9f
2021-03-16 19:16:11 +09:00
Kazuki Yamaguchi 871c61d5d0 [ruby/openssl] x509store: avoid ossl_raise() calls with NULL message
Use the OpenSSL function name that caused the error to generate a better
error message.

https://github.com/ruby/openssl/commit/b31809ba3d
2021-03-16 19:16:11 +09:00
Kazuki Yamaguchi be3ba2ee4d [ruby/openssl] x509store: refactor X509::StoreContext#chain
Use ossl_x509_sk2ary() to create an array of OpenSSL::X509::Certificate
from STACK_OF(X509).

https://github.com/ruby/openssl/commit/fa1da69f92
2021-03-16 19:16:11 +09:00
Kazuki Yamaguchi 08c99a4208 [ruby/openssl] x509store: emit warning if arguments are given to X509::Store.new
Anything passed to OpenSSL::X509::Store.new was always ignored. Let's
emit an explicit warning to not confuse users.

https://github.com/ruby/openssl/commit/d173700eeb
2021-03-16 19:16:11 +09:00
Kazuki Yamaguchi 88b8b3ac15 [ruby/openssl] x509store: let X509::Store#add_file raise TypeError if nil is given
Undo special treatment of nil and simply pass the value to
StringValueCStr().

nil was never a valid argument for the method; OpenSSL::X509::StoreError
with an unhelpful error message "system lib" was raised in that case.

https://github.com/ruby/openssl/commit/fb2fcbb137
2021-03-16 19:16:11 +09:00
Nobuhiro IMAI 92f19f7bb0 [ruby/openssl] [DOC] Fix RDoc markup
https://github.com/ruby/openssl/commit/f36af95519
2021-03-16 19:16:11 +09:00
Claus Lensbøl be1e88a277 [ruby/openssl] Fix typo in documentation
The socket is called ssl_connection, not connection

https://github.com/ruby/openssl/commit/642783aeda
2021-03-16 19:16:11 +09:00
Kazuki Yamaguchi 81325db5f8 [ruby/openssl] ssl: initialize verify_mode and verify_hostname with default values
SSLContext's verify_mode expects an SSL_VERIFY_* constant (an integer)
and verify_hostname expects either true or false. However, they are set
to nil after calling OpenSSL::SSL::SSLContext.new, which is surprising.

Set a proper value to them by default: verify_mode is set to
OpenSSL::SSL::VERIFY_NONE and verify_hostname is set to false by
default.

Note that this does not change the default behavior. The certificate
verification was never performed unless verify_mode is set to
OpenSSL::SSL::VERIFY_PEER by a user. The same applies to
verify_hostname.

https://github.com/ruby/openssl/commit/87d869352c
2021-03-16 19:16:11 +09:00
Colton Jenkins c71afc9db7 [ruby/openssl] Add compare? method to OpenSSL::PKey that wraps EVP_PKEY_cmp.
Explicitly check for type given some conflicting statements within openssl's
documentation around EVP_PKEY_cmp and EVP_PKEY_ASN1_METHOD(3).
Add documentation with an example for compare?

https://github.com/ruby/openssl/commit/0bf51da6e2
2021-03-16 19:16:11 +09:00
Bart de Water da6341b709 [ruby/openssl] User lower case cipher names for maximum compatibility
We ran into some Linux-based systems not accepting the upper case variant

https://github.com/ruby/openssl/commit/7bc49121d5
2021-03-16 19:16:11 +09:00
Kazuki Yamaguchi 13198d4968 [ruby/openssl] hmac: implement base64digest methods
OpenSSL::HMAC implements the similar interface as ::Digest. Let's add
base64digest methods to OpenSSL::HMAC, too, for feature parity.

https://github.com/ruby/openssl/commit/098bcb68af
2021-03-16 19:16:11 +09:00
Kazuki Yamaguchi b91f62f384 [ruby/openssl] hmac: migrate from the low-level HMAC API to the EVP API
Use the EVP API instead of the low-level HMAC API. Use of the HMAC API
has been discouraged and is being marked as deprecated starting from
OpenSSL 3.0.0.

The two singleton methods OpenSSL::HMAC, HMAC.digest and HMAC.hexdigest
are now in lib/openssl/hmac.rb.

https://github.com/ruby/openssl/commit/0317e2fc02
2021-03-16 19:16:11 +09:00
Kazuki Yamaguchi fde9f806cb [ruby/openssl] pkey/ec: deprecate OpenSSL::PKey::EC::Point#mul(ary, ary [, bn])
Deprecate it for future removal. However, I do not expect any
application is affected by this.

The other form of calling it, PKey::EC::Point#mul(bn [, bn]) remains
untouched.

PKey::EC::Point#mul calls EC_POINTs_mul(3) when multiple BNs
are given as an array. LibreSSL 2.8.0 released on 2018-08 removed the
feature and OpenSSL 3.0 which is planned to be released in 2020 will
also deprecate the function as there is no real use-case.

https://github.com/ruby/openssl/commit/812de4253d
2021-03-16 19:16:11 +09:00
Kazuki Yamaguchi 15863069c9 [ruby/openssl] digest, hmac, ts, x509: use IO.binread in examples where appropriate
IO.read may mangle line separator, which will corrupt binary data
including DER-encoded X.509 certificates and such.

Fixes: https://github.com/ruby/openssl/issues/243

https://github.com/ruby/openssl/commit/93213b2730
2021-03-16 19:16:11 +09:00
Kazuki Yamaguchi 9d3ffe09c4 [ruby/openssl] pkey: reimplement PKey::DH#compute_key and PKey::EC#dh_compute_key
Use the new OpenSSL::PKey::PKey#derive instead of the raw
{EC,}DH_compute_key(), mainly to reduce amount of the C code.

https://github.com/ruby/openssl/commit/28edf6bafc
2021-03-16 19:16:11 +09:00
Kazuki Yamaguchi fbadb01d6e [ruby/openssl] pkey: add PKey::PKey#derive
Add OpenSSL::PKey::PKey#derive as the wrapper for EVP_PKEY_CTX_derive().
This is useful for pkey types that we don't have dedicated classes, such
as X25519.

https://github.com/ruby/openssl/commit/28f0059bea
2021-03-16 19:16:11 +09:00
Kazuki Yamaguchi b2dc4880f5 [ruby/openssl] pkey: support 'one-shot' signing and verification
OpenSSL 1.1.1 added EVP_DigestSign() and EVP_DigestVerify() functions
to the interface. Some EVP_PKEY methods such as PureEdDSA algorithms
do not support the streaming mechanism and require us to use them.

https://github.com/ruby/openssl/commit/ae19454592
2021-03-16 19:16:11 +09:00
Kazuki Yamaguchi 5cae289682 [ruby/openssl] pkey: port PKey::PKey#sign and #verify to the EVP_Digest* interface
Use EVP_DigestSign*() and EVP_DigestVerify*() interface instead of the
old EVP_Sign*() and EVP_Verify*() functions. They were added in OpenSSL
1.0.0.

Also, allow the digest to be specified as nil, as certain EVP_PKEY types
don't expect a digest algorithm.

https://github.com/ruby/openssl/commit/9ff6e5143b
2021-03-16 19:16:11 +09:00
Kazuki Yamaguchi 1e3590fe22 [ruby/openssl] pkey: add PKey.generate_parameters and .generate_key
Add two methods to create a PKey using the generic EVP interface. This
is useful for the PKey types we don't have a dedicated class.

https://github.com/ruby/openssl/commit/d8e8e57de9
2021-03-16 19:16:11 +09:00
Kazuki Yamaguchi 498c8e8f17 [ruby/openssl] pkey: assume generic PKeys contain private components
The EVP interface cannot tell whether if a pkey contains the private
components or not. Assume it does if it does not respond to #private?.
This fixes the NoMethodError on calling #sign on a generic PKey.

https://github.com/ruby/openssl/commit/f4c717bcb2
2021-03-16 19:16:11 +09:00
Kazuki Yamaguchi 1f44640677 [ruby/openssl] pkey: refactor #export/#to_pem and #to_der
Add ossl_pkey_export_traditional() and ossl_pkey_export_spki() helper
functions, and use them. This reduces code duplication.

https://github.com/ruby/openssl/commit/56f0d34d63
2021-03-16 19:16:10 +09:00
Kazuki Yamaguchi 707e3d49cb [ruby/openssl] pkey: refactor DER/PEM-encoded string parsing code
Export the flow used by OpenSSL::PKey.read and let the subclasses call
it before attempting other formats.

https://github.com/ruby/openssl/commit/d963d4e276
2021-03-16 19:16:10 +09:00
Kazuki Yamaguchi 10d360847b [ruby/openssl] pkey: prefer PKey.read over PKey::RSA.new in docs
https://github.com/ruby/openssl/commit/cf92a3ffba
2021-03-16 19:16:10 +09:00
Kazuki Yamaguchi efad0166c6 [ruby/openssl] pkey: have PKey.read parse PEM-encoded DHParameter
Try PEM_read_bio_Parameters(). Only PEM format is supported at the
moment since corresponding d2i_* functions are not provided by OpenSSL.

https://github.com/ruby/openssl/commit/867e5c021b
2021-03-16 19:16:10 +09:00
Kazuki Yamaguchi c157f6e787 [ruby/openssl] pkey: inline {rsa,dsa,dh,ec}_instance()
Merge the code into the callers so that the wrapping Ruby object is
allocated before the raw key object is allocated. This prevents possible
memory leak on Ruby object allocation failure, and also reduces the
lines of code.

https://github.com/ruby/openssl/commit/1eb1366615
2021-03-16 19:16:10 +09:00
Kazuki Yamaguchi 27859c09a6 [ruby/openssl] pkey: simplify ossl_pkey_new()
ossl_{rsa,dsa,dh,ec}_new() called from this function are not used
anywhere else. Inline them into pkey_new0() and reduce code
duplication.

https://github.com/ruby/openssl/commit/94aeab2f26
2021-03-16 19:16:10 +09:00
Kazuki Yamaguchi 10289e9f22 [ruby/openssl] config: replace DupConfigPtr() with GetConfig()
Now that OpenSSL::Config wraps a real CONF object, the caller can just
borrow it rather than creating a new temporary CONF object. CONF object
is usually treated as immutable.

DupConfigPtr() is now removed, and GetConfig() is exported instead.

https://github.com/ruby/openssl/commit/d9064190ca
2021-03-16 19:16:10 +09:00
Kazuki Yamaguchi 22aeb6373e [ruby/openssl] config: revert to C implementation of OpenSSL::Config
Revert OpenSSL::Config to using the OpenSSL API and remove our own
parser implementation for the config file syntax.

OpenSSL::Config now wraps a CONF object. Accessor methods deal with the
object directly rather than Ruby-level internal state.

This work is based on the old C code we used before 2010.

https://github.com/ruby/openssl/commit/c891e0ea89
2021-03-16 19:16:10 +09:00
Kazuki Yamaguchi 67f5847c61 [ruby/openssl] config: remove deprecated methods
Remove 4 deprecated methods.

The following two methods have been marked as deprecated since 2003,
by r4531 (ruby.git commit 78ff3833fb).

 - OpenSSL::Config#value
 - OpenSSL::Config#section

Other two methods are removed because the corresponding functions
disappeared in OpenSSL 1.1.0.

 - OpenSSL::Config#add_value
 - OpenSSL::Config#[]=

https://github.com/ruby/openssl/commit/9783d7f21c
2021-03-16 19:16:10 +09:00
Spencer McIntyre 4d8bce227c [ruby/openssl] Define Cipher #ccm_data_len= for CCM mode ciphers
Allow specifying just length to #update

CCM mode ciphers need to specify the total plaintext or ciphertext
length to EVP_CipherUpdate.

Update the link to the tests file

Define Cipher#ccm_data_len= for CCM mode ciphers

Add a unit test for CCM mode

Also check CCM is authenticated when testing

https://github.com/ruby/openssl/commit/bb3816953b
2021-03-16 19:16:10 +09:00
wanabe 0c5f8c6276 [ruby/zlib] Resume zstream if available [Bug #10961] 2021-03-09 13:19:03 +09:00
Nobuyoshi Nakada 32a13591e0
[ruby/stringio] Check if closed in loop
[Bug #17675] https://bugs.ruby-lang.org/issues/17675

https://github.com/ruby/stringio/commit/1ed61d0cbc
2021-03-08 10:13:29 +09:00
Hiroshi SHIBATA 99f54c0895
[ruby/stringio] Use Gemfile instead of Gem::Specification#add_development_dependency.
https://github.com/ruby/stringio/commit/157fe9f04d
2021-03-08 10:12:57 +09:00
Nobuyoshi Nakada f6d5de8f33 [ruby/io-wait] Declare as Ractor-safe
Fixes https://bugs.ruby-lang.org/issues/17659

https://github.com/ruby/io-wait/commit/ba338b4764
2021-03-07 09:54:35 +09:00
Nobuyoshi Nakada ea81fff564 [ruby/io-wait] bump up to 0.1.1
https://github.com/ruby/io-wait/commit/88db082d60
2021-03-07 09:54:35 +09:00
Nobuyoshi Nakada 05d118feea [ruby/io-wait] Fixed required_ruby_version
Before 3.0.0, io-wait has not been gemified.

https://github.com/ruby/io-wait/commit/6fed3da323
2021-03-07 09:54:35 +09:00
Nobuyoshi Nakada 3ba1580d80 [ruby/io-wait] Revise IO#wait arguments
https://github.com/ruby/io-wait/commit/0599f6d4d6
https://github.com/ruby/io-wait/commit/4e982aea1b
https://github.com/ruby/io-wait/commit/5b45685eb3
2021-03-07 09:54:35 +09:00
Aaron Patterson d45466dc5b
Oops! Add another test and fix to_proc implementation 2021-02-26 10:06:56 -08:00
Aaron Patterson 0590e9b677
Fiddle::Function responds to to_proc
This lets us cast a Fiddle::Function to a block, allowing is to write
things like:

```ruby
f = Fiddle::Function.new(@libc['strcpy'], [TYPE_VOIDP, TYPE_VOIDP], TYPE_VOIDP)
define_method :strcpy, &f
```
2021-02-26 09:57:13 -08:00
Shugo Maeda 5de38c41ae
ripper: fix a bug of Ripper::Lexer with syntax error and heredoc [Bug #17644] 2021-02-19 16:40:29 +09:00
Nobuyoshi Nakada 9a5da2dcff [ruby/readline-ext] Initialize libedit before managing the history
Fixes https://bugs.ruby-lang.org/issues/17629

https://github.com/ruby/readline-ext/commit/250d6787ed
2021-02-18 21:18:37 +09:00
Jeremy Evans c03b723f56 Update class documentation for StringScanner
The [] wasn't being displayed, and try to fix formatting for bol?
and << (even if they aren't linked).

Fixes [Bug #17620]
2021-02-10 08:17:07 -08:00
Hiroshi SHIBATA e72757a311 [ruby/zlib] Don't use gemspec for gem dependecy
https://github.com/ruby/zlib/commit/7d3d19710f
2021-02-10 12:49:33 +09:00
Nobuyoshi Nakada 6bb103f012
[ruby/console] Updated depend 2021-02-09 17:49:28 +09:00
Nobuyoshi Nakada 5bfca88f76
[ruby/io-console] Fixed typo 2021-02-09 17:39:00 +09:00
Nobuyoshi Nakada df4f8aa248
[ruby/io-console] Fixed regression against 3.0 2021-02-09 17:38:52 +09:00
Samuel Williams 5f69a7f604
Expose scheduler as public interface & bug fixes. (#3945)
* Rename `rb_scheduler` to `rb_fiber_scheduler`.

* Use public interface if available.

* Use `rb_check_funcall` where possible.

* Don't use `unblock` unless the fiber was non-blocking.
2021-02-09 19:39:56 +13:00
Nobuyoshi Nakada 4186cd6435
Revert a part of "[DOC] refined" [ci skip]
This reverts commit 478716f49a
partially -- "Removed unnecessary parentheses" part -- because of
a lambda, see 9e25eb308d.
2021-02-08 21:46:07 +09:00
Nobuyoshi Nakada 478716f49a
[DOC] refined
* Adjusted indentation in license section, and used "(c)"
* Commented out invalid syntax to enable highlighting
* Removed unnecessary parentheses
2021-02-07 21:24:44 +09:00
Jean Boussier 3a888398a6 objspace_dump.c: tag singleton classes and reference the superclass 2021-02-04 09:53:31 -08:00
Dimitris Zorbas 46b5b51cc6 [DOC] Fix typo in ext/socket/socket.c [ci skip] 2021-02-04 13:29:58 +09:00
Kenta Murata 4e2e1d6093
[ruby/bigdecimal] Fix uint64 conversion
Stop using logarithm to compute the number of components.
Instead, use the theoretical maximum number of components for buffer,
and count up the actual number of components during conversion.

https://github.com/ruby/bigdecimal/commit/9067b353ac
2021-02-04 13:18:58 +09:00
Kenta Murata 868d66e0b5
[ruby/bigdecimal] Stop using rmpd and RMPD prefixes and DBLE_FIG
https://github.com/ruby/bigdecimal/commit/7479923fdb
2021-02-04 13:18:52 +09:00
Kenta Murata 8df1881c8f [ruby/bigdecimal] Fix the maximum length of float number
This change is for preventing the false-positive alert by CoverityScan.
See CID-1471770 for the detail.

https://github.com/ruby/bigdecimal/commit/4d5b97125b
2021-02-03 18:25:03 +09:00
Aaron Patterson 8ef30bcc04
Fix GC compatibility: Don't stash encodings in global constants
This value should either be pinned, or looked up when needed at runtime.
Without pinning, the GC may move the encoding object, and that could
cause a crash.

In this case it is easier to find the value at runtime, and there is no
performance penalty (as Ruby caches encoding indexes).  We can shorten
the code, be compaction friendly, and incur no performance penalty.
2021-02-01 12:20:34 -08:00
Nobuyoshi Nakada 9241211538 Forward keyword arguments for Pathname#each_line [Bug #17589] 2021-01-29 14:27:53 +09:00
Kenta Murata a1bb110b56 [ruby/bigdecimal] [Doc] Fix the comment of BigDecimal_div2 [ci skip]
https://github.com/ruby/bigdecimal/commit/a109d0984f
2021-01-22 14:07:32 +09:00
Kenta Murata 887a1bfbbc [ruby/bigdecimal] Stop using GetVpValue in rb_big_convert_to_BigDecimal
https://github.com/ruby/bigdecimal/commit/034fd2b25e
2021-01-22 13:59:04 +09:00
Jean Boussier 6ca3d1af33 objspace_dump.c: Handle allocation path and line missing 2021-01-20 10:48:13 -08:00
manga_osyo b84b253a69 Fix Ripper with heredoc. 2021-01-17 12:58:13 +09:00
Nobuyoshi Nakada 35a047301b
[ruby/io-console] Rubygems 3.2 supports `--platform` option
https://github.com/ruby/io-console/commit/c8046fde84
2021-01-16 19:42:53 +09:00
Nobuyoshi Nakada 6ab5504fe5
[ruby/io-console] Moved JRuby version files into particular path
https://github.com/ruby/io-console/commit/b0691d2c20
2021-01-16 19:42:52 +09:00
Nobuyoshi Nakada 92da224d22
[ruby/io-console] Delegate to JRuby version
Add `--platform` option tentatively.

https://github.com/ruby/io-console/commit/3bf1a7b753
2021-01-16 19:42:52 +09:00
Nobuyoshi Nakada c143a2f947
[ruby/io-console] bump up to 0.5.7
https://github.com/ruby/io-console/commit/f55d7ebff6
2021-01-16 19:42:52 +09:00
Kenta Murata b130644584 [ruby/bigdecimal] Fix for the coerce cases in divide and DoDivmod
https://github.com/ruby/bigdecimal/commit/1cb92487f7
2021-01-16 00:09:26 +09:00
Kenta Murata 9d0c5e2754 [ruby/bigdecimal] Use pre-allocated special values in BigDecimal_DoDivmod
https://github.com/ruby/bigdecimal/commit/d2746121cf
2021-01-16 00:08:09 +09:00
Kenta Murata f95f85b215 [ruby/bigdecimal] Use new conversion functions in BigDecimal_DoDivmod
https://github.com/ruby/bigdecimal/commit/68c20200d5
2021-01-16 00:07:48 +09:00
Kenta Murata 0a039c5fbb [ruby/bigdecimal] Use new conversion functions in BigDecimal_divide
https://github.com/ruby/bigdecimal/commit/3b55ad1c42
2021-01-15 06:42:48 +09:00
Kenta Murata 500fc63cd0 [ruby/bigdecimal] Reorder the arguments of BigDecimal_divide
https://github.com/ruby/bigdecimal/commit/1e03da7076
2021-01-15 06:42:38 +09:00
Kenta Murata 4d13f3e9da [ruby/bigdecimal] Explicitly cast size_t to int
https://github.com/ruby/bigdecimal/commit/b1f1ed26c9
2021-01-14 10:21:10 +09:00
Kenta Murata b4ade73974
[ruby/bigdecimal] Explicitly cast uint64_t to double
https://github.com/ruby/bigdecimal/commit/f0d94e6843
2021-01-14 10:20:47 +09:00
Kenta Murata e129be7592 [ruby/bigdecimal] Suppress warning at NO_SANITIZE on gcc
https://github.com/ruby/bigdecimal/commit/f6765b8071
2021-01-14 10:20:30 +09:00
Nobuyoshi Nakada 521ad9a13a Moved Fiber methods into core [Feature #17407] 2021-01-13 23:20:02 +09:00
Kenta Murata a5b4b806de
[ruby/bigdecimal] Allow digits=0 in BigDecimal(flt) and Float#to_d
Using dtoa of mode=0, we can determine the number of digits in decimal that is
necessary to represent the given Float number without errors.

This change permits digits=0 in BigDecimal(flt) and Float#to_d, and these
methods use dtoa of mode=0 when the given digits is 0.

Internal implicit conversion from Float also uses digits=0.

[Fix GH-70]

https://github.com/ruby/bigdecimal/commit/2dbe170e35
2021-01-13 11:49:18 +09:00
Kenta Murata 0a4f719a06
Update ext/bigdecimal/depend 2021-01-13 09:36:17 +09:00
Kenta Murata 28321e400e
Update ext/bigdecimal/depend 2021-01-13 09:08:48 +09:00
Kenta Murata 4ba3a4491e
[ruby/bigdecimal] Optimize rb_float_convert_to_BigDecimal by using dtoa
This improve the conversion speed several times faster than before.

```
RUBYLIB= BUNDLER_ORIG_RUBYLIB= /home/mrkn/.rbenv/versions/3.0.0/bin/ruby -v -S benchmark-driver /home/mrkn/src/github.com/ruby/bigdecimal/benchmark/from_float.yml
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-linux]
Calculating -------------------------------------
                     bigdecimal 3.0.0      master
              flt_e0         156.400k    783.356k i/s -    100.000k times in 0.639388s 0.127656s
            flt_ep10         158.640k    777.978k i/s -    100.000k times in 0.630359s 0.128538s
           flt_ep100         101.676k    504.259k i/s -    100.000k times in 0.983512s 0.198311s
            flt_em10         103.439k    726.339k i/s -    100.000k times in 0.966751s 0.137677s
           flt_em100          79.675k    651.446k i/s -    100.000k times in 1.255095s 0.153505s

Comparison:
                           flt_e0
              master:    783355.6 i/s
    bigdecimal 3.0.0:    156399.5 i/s - 5.01x  slower

                         flt_ep10
              master:    777977.6 i/s
    bigdecimal 3.0.0:    158639.7 i/s - 4.90x  slower

                        flt_ep100
              master:    504259.4 i/s
    bigdecimal 3.0.0:    101676.5 i/s - 4.96x  slower

                         flt_em10
              master:    726338.6 i/s
    bigdecimal 3.0.0:    103439.2 i/s - 7.02x  slower

                        flt_em100
              master:    651446.3 i/s
    bigdecimal 3.0.0:     79675.3 i/s - 8.18x  slower

```

https://github.com/ruby/bigdecimal/commit/5bdaedd530
https://github.com/ruby/bigdecimal/commit/9bfff57f90
https://github.com/ruby/bigdecimal/commit/d071a0abbb
2021-01-13 02:11:18 +09:00
Kenta Murata 2175c2c957 [ruby/bigdecimal] Use pre-allocated objects for special values
https://github.com/ruby/bigdecimal/commit/95c201f2d3
2021-01-13 01:58:23 +09:00
Kenta Murata 6670de82c2
[ruby/bigdecimal] Fix exception message raised in Kernel.BigDecimal
https://github.com/ruby/bigdecimal/commit/d163f170a4
https://github.com/ruby/bigdecimal/commit/ff8eeeb064
2021-01-13 01:27:04 +09:00
Kenta Murata ccabf4966f [ruby/bigdecimal] Fix length calculation in rb_uint64_convert_to_BigDecimal
https://github.com/ruby/bigdecimal/commit/14e53ed7f6
2021-01-12 17:38:43 +09:00
Kenta Murata 1d04faee23 [ruby/bigdecimal] Use rb_cstr_convert_to_BigDecimal in GetVpValueWithPrec
https://github.com/ruby/bigdecimal/commit/381ddf5ff6
2021-01-12 09:22:14 +09:00
Kenta Murata 78d3813c74 [ruby/bigdecimal] Add rb_cstr_convert_to_BigDecimal
https://github.com/ruby/bigdecimal/commit/ac230a996e
2021-01-12 09:21:58 +09:00
Nobuyoshi Nakada d2aaf865e3 [ruby/etc] Added fallback definition of RUBY_ATOMIC_EXCHANGE
https://github.com/ruby/etc/commit/0c5900bd21
2021-01-11 11:39:12 +09:00
Nobuyoshi Nakada f6e2c41db3 [ruby/etc] Check blocking variables at release
https://github.com/ruby/etc/commit/f017bdfedf
2021-01-11 11:39:10 +09:00
Kenta Murata 2e9b6096a6 [ruby/bigdecimal] Fix type name
https://github.com/ruby/bigdecimal/commit/2dad4d17b2
2021-01-10 08:40:05 +09:00
Kenta Murata 8b53cbaf5e
[ruby/bigdecimal] Avoid casting negative value to size_t
https://github.com/ruby/bigdecimal/f047b2786f
2021-01-10 08:36:29 +09:00
Kenta Murata 72d504c1fd
[ruby/bigdecimal] Use smallest local variable scope in GetVpValueWithPrec
https://github.com/ruby/bigdecimal/commit/44f26b9aa0
2021-01-10 08:35:43 +09:00
Nobuyoshi Nakada 590dc06e38 Get rid of defining methods for tests in core classes
Not to interfere in other tests.
2021-01-09 22:38:06 +09:00
Kenta Murata 3d9c95996d
[ruby/bigdecimal] Stop using GetVpValueWithPrec in rb_rational_convert_to_BigDecimal
https://github.com/ruby/bigdecimal/commit/b4f470da61
https://github.com/ruby/bigdecimal/commit/44a78df866
2021-01-09 20:36:47 +09:00
Kenta Murata be34e31d8e [ruby/bigdecimal] Add assertions for checking the argument types
https://github.com/ruby/bigdecimal/commit/96c9ebd886
2021-01-09 20:36:18 +09:00
Kenta Murata fb18a8113a
[ruby/bigdecimal] Stop using GetVpValueWithPrec in rb_float_convert_to_BigDecimal
https://github.com/ruby/bigdecimal/commit/33e7c50263
https://github.com/ruby/bigdecimal/commit/d3c1b0b921
2021-01-09 20:35:52 +09:00
Kenta Murata 82f6085b3e [ruby/bigdecimal] Fix trailing zero handling in rb_uint64_convert_to_BigDecimal
https://github.com/ruby/bigdecimal/commit/2056604d56
2021-01-07 10:20:40 +09:00
Kenta Murata fa8295ccb9
[ruby/bigdecimal] Rename BDIGIT to DECDIG
https://github.com/ruby/bigdecimal/commit/686487d942
2021-01-06 13:52:12 +09:00
Kenta Murata 7da06c04b2
Need to convert the return value of rb_big_cmp 2021-01-06 13:39:09 +09:00
Kenta Murata f289f8ae3a [ruby/bigdecimal] Optimize the conversion from small Bignum
https://github.com/ruby/bigdecimal/commit/4792a917d8
2021-01-06 10:56:48 +09:00
Kenta Murata 31854403b3
[ruby/bigdecimal] Check the function availabilities separately
https://github.com/ruby/bigdecimal/commit/cf839a34c8
https://github.com/ruby/bigdecimal/commit/75db4dabb9
2021-01-06 09:25:13 +09:00
Marcus Stollsteimer 3108ad7bf3 [DOC] Fix grammar: "is same as" -> "is the same as" 2021-01-05 15:13:53 +01:00
Kazuhiro NISHIYAMA 3d43944725
Fix a typo [ci skip] 2021-01-05 23:10:39 +09:00
Nobuyoshi Nakada 83e62d7798 [ruby/io-console] Shrink struct query_args
https://github.com/ruby/io-console/commit/720be0a3e5
2021-01-05 21:26:15 +09:00
Nobuyoshi Nakada 4272395982 [ruby/io-console] Pre-define chomp! ID
https://github.com/ruby/io-console/commit/028e1c9497
2021-01-05 21:26:13 +09:00
Nobuyoshi Nakada ead8d89bd7 [ruby/io-console] Ignore chomp! result and return the modified string
https://github.com/ruby/io-console/commit/09e5ccc729
2021-01-05 21:26:11 +09:00
Marcus Stollsteimer 451b456051 [ruby/io-console] [DOC] Note that IO#getpass returns a chomped string
IO#getpass uses String#chomp! on the read input line.

https://github.com/ruby/io-console/commit/1e98c93bc8
2021-01-05 12:59:53 +09:00
Koichi Sasada e7fc353f04 enable constant cache on ractors
constant cache `IC` is accessed by non-atomic manner and there are
thread-safety issues, so Ruby 3.0 disables to use const cache on
non-main ractors.

This patch enables it by introducing `imemo_constcache` and allocates
it by every re-fill of const cache like `imemo_callcache`.
[Bug #17510]

Now `IC` only has one entry `IC::entry` and it points to
`iseq_inline_constant_cache_entry`, managed by T_IMEMO object.

`IC` is atomic data structure so `rb_mjit_before_vm_ic_update()` and
`rb_mjit_after_vm_ic_update()` is not needed.
2021-01-05 02:27:58 +09:00
Nobuyoshi Nakada 433a3be86a
ripper: call #pretty_print on also `state` 2021-01-04 23:37:00 +09:00
Kenta Murata 4b90ea8480
Update ext/bigdecimal/depend 2021-01-04 13:42:10 +09:00
Kenta Murata 71f0dd339b
[ruby/bigdecimal] Move some definitions to missing.h
https://github.com/ruby/bigdecimal/commit/c2b22cc8b3
https://github.com/ruby/bigdecimal/commit/8cbca8481d
https://github.com/ruby/bigdecimal/commit/f05aecf673
2021-01-04 13:29:10 +09:00
Kenta Murata 597e063606
Revert "Include RUBY_EXTCONF_H if available"
It is unnecessary because RUBY_EXTCONF_H has already been included in
ruby/internal/config.h.

This reverts commit 0644f466b0.
2021-01-04 12:01:04 +09:00
Kenta Murata 0644f466b0
Include RUBY_EXTCONF_H if available 2021-01-03 23:38:21 +09:00
Kenta Murata a6bbba1135
Avoid to use __builtin_clzl in SPARC Solaris 2021-01-02 12:06:14 +09:00
Kenta Murata ef6ab776d5
Add __x86_64__ guard to include x86intrin.h 2021-01-02 10:18:58 +09:00
Nobuyoshi Nakada 5aa28d9d6d
Check if x86intrin.h is available not only existing 2021-01-02 09:48:42 +09:00
Kenta Murata 830afd94fe
[ruby/bigdecimal] Update depend 2021-01-02 01:03:32 +09:00
Kenta Murata c2c0147538
[ruby/bigdecimal] Fix test for Ruby 2.4
Ruby 2.4 does not have RbConfig::LIMITS.

https://github.com/ruby/bigdecimal/commit/c8087523b0
2021-01-02 00:54:09 +09:00
Kenta Murata 448a67cd81
[ruby/bigdecimal] Implement special conversions for 64-bit integers
This change improves the conversion speed from small integers.

```
Comparison:
                           big_n9
              master:   4003688.9 i/s
    bigdecimal 3.0.0:   1270551.0 i/s - 3.15x  slower

                          big_n19
              master:   5410096.4 i/s
    bigdecimal 3.0.0:   1000250.3 i/s - 5.41x  slower
```

https://github.com/ruby/bigdecimal/commit/3429bd7e6f
2021-01-02 00:54:09 +09:00
Kenta Murata a8014dae47 [ruby/bigdecimal] Refactor object allocation
https://github.com/ruby/bigdecimal/commit/271cebe567
2020-12-31 02:05:02 +09:00
Kenta Murata 4569e46550 [ruby/bigdecimal] Remove ToValue
https://github.com/ruby/bigdecimal/commit/97e9feeebd
2020-12-31 02:04:53 +09:00
Kenta Murata 8d93c1e70f [ruby/bigdecimal] Remove VP_EXCEPTION_MEMORY
It is no longer used due to the previous commit.

https://github.com/ruby/bigdecimal/commit/7d463f802b
2020-12-30 00:22:21 +09:00
Kenta Murata 086f3f1872 [ruby/bigdecimal] Remove needless pointer checks
xmalloc and xrealloc return non-NULL pointers or raise memory error.

https://github.com/ruby/bigdecimal/commit/507f0a6a64
2020-12-30 00:22:11 +09:00
Kenta Murata 47a1f5ff73
[ruby/bigdecimal] Define bool, true, and false for old Ruby
https://github.com/ruby/bigdecimal/commit/a6d3bd2d44
2020-12-29 17:46:37 +09:00
Kenta Murata 29d012c964
[ruby/bigdecimal] Alloc wrapper object before VpAlloc
Calling TypedData_Wrap_Struct after VpAlloc may cause memory leak.

This commit reverts d11b78f9c4.

https://github.com/ruby/bigdecimal/commit/2c5a288caf
2020-12-29 17:46:36 +09:00
Kenta Murata 13b520d578
[ruby/bigdecimal] Refactor to extract VpCheckException
https://github.com/ruby/bigdecimal/commit/6fd171308b
2020-12-29 17:46:36 +09:00
Nobuyoshi Nakada d57c5a7b61 transcode-tblgen.rb: make silent a little when just -v 2020-12-29 17:45:19 +09:00
Masaki Matsushita 1ffb267c5c Fix compile error of sockssocket
The patch is provided by PhobosK (Phobos Kappa).

This should be backported to Ruby 3.0.

[Feature #17187]
2020-12-29 15:52:42 +09:00
Kenta Murata 512e08895f [ruby/bigdecimal] Refactor to decompose VpNewVarArg into small functions
https://github.com/ruby/bigdecimal/commit/7504871c48
2020-12-29 12:56:10 +09:00
Kenta Murata d11b78f9c4 [ruby/bigdecimal] Reduce needless object allocation in f_BigDecimal
https://github.com/ruby/bigdecimal/commit/5c808eeabb
2020-12-29 12:54:39 +09:00
Kenta Murata 06b44f819e [ruby/bigdecimal] [Doc] Fix the document of BigDecimal()
[ci-skip]

https://github.com/ruby/bigdecimal/commit/905d0345ec
2020-12-28 21:26:26 +09:00
Kenta Murata 80d9e457c5
[ruby/bigdecimal] Reduce conditional branch count in VpNewVarArg
https://github.com/ruby/bigdecimal/commit/741fb3e00f
2020-12-28 21:16:48 +09:00
Nobuyoshi Nakada 730b0099fd
Get rid of inconsistent dll linkages against vcpkg readline 2020-12-27 19:35:27 +09:00
Nobuyoshi Nakada 0a2e4a8f0c
Removed declarations conflicting on MinGW 2020-12-27 19:19:31 +09:00
Nobuyoshi Nakada 66719d7dc8 etc: use atomic operation instead of mutex 2020-12-24 11:43:21 +09:00
Nobuyoshi Nakada 6ed6b85ece Expose atomic operation macros with RUBY prefix
Now we need atomic operations, which are lighter than mutex, more
widely for extension libraries because of Ractor.
2020-12-24 11:43:21 +09:00
Kenta Murata 94015200b6
[fiddle] Update to 1.0.6 2020-12-23 23:40:04 +09:00
Hiroshi SHIBATA 684649ea05 [ruby/psych] Bump version to 3.3.0
https://github.com/ruby/psych/commit/0abce07b90
2020-12-23 19:53:21 +09:00
Kenta Murata aad88cc10b [ruby/date] Define dummy RUBY_TYPED_FROZEN_SHAREABLE for old Ruby
https://github.com/ruby/date/commit/9f3e90ad10
2020-12-23 18:32:24 +09:00
Marc-Andre Lafortune daec109f42 [ruby/psych] Optimize cache with `compare_by_identity`
Using `compare_by_identity` gives a 4x performance boost on cache hits.
Benchmark in https://github.com/JuanitoFatas/fast-ruby/issues/189
2020-12-23 01:08:38 -05:00
Marc-Andre Lafortune c5a445d577 [ruby/psych] Make Ractor-ready.
Config is Ractor-local.

Benchmarking reveals that using `Ractor.local_storage` for storing cache
is similar to accessing a constant (~15% slower).
2020-12-23 01:08:38 -05:00
Marc-Andre Lafortune 3ee0ad9190 [ruby/psych] Don't use instance variables directly for config 2020-12-23 01:08:38 -05:00
Marc-Andre Lafortune d1963adae8 [ruby/psych] Avoid methods depending on bindings
Improves Ractor-readiness.
2020-12-23 01:08:38 -05:00
Marc-Andre Lafortune 0eb94dae4a [ruby/psych] Freeze constants.
Improves Ractor-readiness.
2020-12-23 01:08:38 -05:00
Hiroshi SHIBATA 5cf25c55a6
Update version for Ractor-safe extensions 2020-12-23 14:03:54 +09:00
Marc-Andre Lafortune cd63f0358f [ruby/etc] Make Ractor safe 2020-12-22 19:46:07 -05:00
Marc-Andre Lafortune 3286380ebc [ruby/etc] Refactor locks using mutex API 2020-12-22 19:46:07 -05:00
Kenta Murata 01ab29cc28
[memory_view] Make some rb_memroy_view_t members const 2020-12-23 09:24:55 +09:00
Kenta Murata db0385d657
[memory_view] Remove needless use of StringValueCStr 2020-12-23 09:24:54 +09:00
Kenta Murata b3ea828c8e
[memory_view] Add mdview_release_view for test 2020-12-23 09:24:54 +09:00
Kenta Murata 74652e640a
[memory_view][fiddle] Rename len to byte_size in rb_memory_view_t 2020-12-23 09:24:53 +09:00
Kenta Murata 05014dcb88
[memory_view][fiddle] Use bool for boolean return value 2020-12-23 09:05:07 +09:00
Sutou Kouhei 32849dc1bb fiddle: Update to 1.0.5 2020-12-23 05:49:52 +09:00
Hiroshi SHIBATA 034c19ce28
Merge json-2.5.1 2020-12-22 21:51:15 +09:00
Hiroshi SHIBATA edb76e8765 Prepare to release json-2.5.0 2020-12-22 19:44:27 +09:00
Marc-Andre Lafortune f2f00e24fa [ruby/date] Make Ractor-compatible 2020-12-22 03:12:51 -05:00
Marc-Andre Lafortune ee102de6d7 [ruby/date] Deep-freeze internal constants.
Probably not strictly necessary, but good principle anyways.
2020-12-22 03:12:51 -05:00
Nobuyoshi Nakada 8918a9cf6c Removed rb_cData entity
* Use the wrapper of rb_cObject instead of data access
* Replaced rest of extentions
* Updated the version guard for Data
* Added the version guard of rb_cData
2020-12-22 02:51:49 +09:00
Kenta Murata 0b6a80c0be
[json] Avoid method redefinition 2020-12-21 22:41:24 +09:00
Kenta Murata 14d7d1df25
[json] Make json Ractor safe 2020-12-21 22:10:43 +09:00
Kenta Murata 4c2e7f26bd
[json] JSON_parse_float: Fix how to convert number
Stop BigDecimal-specific optimization.  Instead, it tries the conversion
methods in the following order:

1. `try_convert`,
2. `new`, and
3. class-named function, e.g. `Foo::Bar.Baz` function for `Foo::Bar::Baz` class

If all the above candidates are unavailable, it fallbacks to Float.
2020-12-21 22:10:43 +09:00
Kenta Murata 596da98b3f
[json] Make JSON.create_id thread-safe 2020-12-21 22:10:42 +09:00
Kenta Murata 98cc15ed1e
[json] Stop using prototype objects 2020-12-21 22:10:33 +09:00
Kenta Murata d8469507b9
[ruby/digest] Remove .gitignore and .travis.yml from gemspec
https://github.com/ruby/digest/commit/7b57b73f46
2020-12-21 17:46:30 +09:00
Kazuki Tsujimoto 67ee1cbdd5
Remove unnecessary files from .document
* ruby:ext/rbconfig/exts.mk
* ruby:ext/rbconfig/sizeof/Makefile
* ruby:ext/rbconfig/sizeof/depend
* ruby:ext/rbconfig/sizeof/mkmf.log
* ruby:ext/win32/depend
* ruby:ext/win32/exts.mk
* ruby:ext/win32/resolv/depend
* ruby:lib/racc/pre-setup
2020-12-20 16:00:13 +09:00
Koichi Sasada bcf4b236e4 ext/racc/cparse is ractor-safe 2020-12-20 04:22:29 +09:00
Koichi Sasada 846c4b03b8 ext/monitor is ractor-safe 2020-12-20 04:22:29 +09:00
Koichi Sasada c1461c927b cgi/escape is ractor-safe 2020-12-20 04:22:29 +09:00
Nobuyoshi Nakada c01ad11f90
bigdecimal: initialize conditionally assigned variable 2020-12-20 03:13:33 +09:00
Kenta Murata de80b92891
[pathname] Make Pathname Ractor safe (#3940) 2020-12-20 00:40:47 +09:00
Kenta Murata 8986f948e0
[bigdecimal] Version 3.0.0
https://github.com/ruby/bigdecimal/commit/e68f1eb33a
2020-12-19 22:13:59 +09:00
Kenta Murata df3deb3baa
[bigdecimal] Add BigDecimal#n_significant_digits
https://github.com/ruby/bigdecimal/commit/981dc48f95
https://github.com/ruby/bigdecimal/commit/9ecf880ec04
2020-12-19 22:13:59 +09:00
Kenta Murata 654f6fbf19
[bigdecimal] Make BigDecimal#precs deprecated
https://github.com/ruby/bigdecimal/commit/7e80e6e145
https://github.com/ruby/bigdecimal/commit/0ed7846e8c
2020-12-19 22:13:58 +09:00
Kenta Murata ff9e40811c
[bigdecimal] Add BigDecimal#precision
https://github.com/ruby/bigdecimal/commit/458eb66c49
2020-12-19 22:13:58 +09:00
Kenta Murata 928a06723d
[bigdecimal] Make bigdecimal Ractor safe
https://github.com/ruby/bigdecimal/commit/93fc392640
https://github.com/ruby/bigdecimal/commit/a90d13c4d0
2020-12-19 22:13:57 +09:00
Kenta Murata 97d4e72e0b
[bigdecimal] Use DBLE_FIG
https://github.com/ruby/bigdecimal/commit/12296dcb90
2020-12-19 22:13:57 +09:00
Kenta Murata e1424c3501
[bigdecimal] Fix the default precision of Float#to_d
Fix https://github.com/ruby/bigdecimal/issues/70
[Bug #13331]

https://github.com/ruby/bigdecimal/commit/aa536cd4b5
2020-12-19 22:13:53 +09:00
Nobuhiro IMAI e33eb09b76 ripper: fix `#tok` on some error events [Bug 17345]
sorting alias target by event arity, and setup suitable `Elem` for error.
2020-12-19 17:32:39 +09:00
Nobuyoshi Nakada 5c9d6ea6b4
Strip trailing spaces [ci skip] 2020-12-19 15:34:37 +09:00
Kenta Murata 0cb556b457
[digest] Version 3.0.0
https://github.com/ruby/digest/commit/4bbd247a32
2020-12-19 15:08:01 +09:00
Kenta Murata b66f52b0e3
[digest] Make digest Ractor safe
https://github.com/ruby/digest/commit/c13a024b85
https://github.com/ruby/digest/commit/9edca3f8be
https://github.com/ruby/digest/commit/378b56b6ca
2020-12-19 15:08:01 +09:00
Nobuyoshi Nakada feacae193c
[digest] Added rb_digest_make_metadata to wrap metadata
https://github.com/ruby/digest/commit/7046fe6005
2020-12-19 15:08:01 +09:00
Kenta Murata d5ab8e8562
[bigdecimal] Use rb_undef_alloc_func to undefine allocate 2020-12-19 02:29:31 +09:00
Koichi Sasada e76b56f58e support Ruby 2.x for openssl 2020-12-19 02:05:08 +09:00
Kenta Murata c71934f8a5
[stringio] Version 3.0.0
https://github.com/ruby/stringio/commit/831be01071
2020-12-18 22:00:07 +09:00
Kenta Murata e1b5289a2b
[stringio] Add test-unit in the development dependencies
https://github.com/ruby/stringio/commit/de010fc0e9
2020-12-18 22:00:07 +09:00
Kenta Murata 3d31944129
[stringio] Make stringio Ractor safe
https://github.com/ruby/stringio/commit/ee3fec7512
https://github.com/ruby/stringio/commit/18dcd045ef
https://github.com/ruby/stringio/commit/18dcd045ef
2020-12-18 22:00:07 +09:00
Kenta Murata 14ca7f633c
[openssl] Fix dependencies 2020-12-18 21:58:41 +09:00
Koichi Sasada b5588edc0a openssl is ractor-safe
ossl_bn_ctx is C's global variable and it should be ractor-local
to make it ractor-safe.
2020-12-18 18:19:33 +09:00
Kenta Murata b5de66e132
[strscan] Fix license comment and files
https://github.com/ruby/strscan/commit/a999f2c6d1
2020-12-18 14:25:48 +09:00
Kenta Murata 5370963992
[strscan] Version 3.0.0
https://github.com/ruby/strscan/commit/08645e4e77
2020-12-18 14:25:42 +09:00
Kenta Murata 985f0af257
[strscan] Make strscan Ractor safe (#17)
* Make strscan Ractor safe

* Add test-unit in the development dependencies

https://github.com/ruby/strscan/commit/3c93c2bebe
2020-12-18 14:25:41 +09:00
Koichi Sasada b44f7151c7 zlib is ractor-safe 2020-12-18 14:09:32 +09:00
Koichi Sasada a07f249803 socket is ractor-safe. 2020-12-18 11:23:34 +09:00
Hiroshi SHIBATA a09c3c6fe1
expand VERSION path for ruby repository. 2020-12-17 14:37:45 +09:00
Hiroshi SHIBATA 46ea74297e
Bump version to json-2.4.1 and use VERSION file for json version same as upstream 2020-12-17 14:20:42 +09:00
Kenta Murata 1bafb3cb47
[memory_view] Make MemoryView API Ractor-safe (#3911)
* memory_view.c: make Ractor-safe

* test/ruby/test_memory_view.rb: Add test_ractor

* memory_view: fix typo

* memory_view.c: Use st_update in unregster_exported_object

* memory_view: update dependency
2020-12-16 13:43:56 +09:00
Nobuyoshi Nakada e0bdd54348 Ripper: Refined error callbacks [Bug #17345] 2020-12-15 21:36:23 +09:00
Hiroshi SHIBATA ad3e3bd65a
Bump version to json-2.4.0 2020-12-15 19:54:58 +09:00
Kenta Murata a86c147579
Import bigdecimal 2.0.2 (#3905)
* remove duplicated include

* Make BigDecimal#round with argument < 1 return Integer

Fixes [Bug #12780]

* Use a higher default precision for BigDecimal#power and #**

When a fractional power is given, increase the precision if the
precision isn't specified via power's second argument:

Float: increase by 15 (rough number of decimal precision in float)
BigDecimal: increase by adding similar precision modifier as done to
            calculate the base precision.
Rational: double the precision, since a BigDecimal is created, but
          the created BigDecimal uses the same precision.

Increasing the precision for these power calculations has the obvious
tradeoff of making the calculations slower.

Fixes Ruby Bug #17264

* Use DBLE_FIG for a Float value

* Version 2.0.1

Co-authored-by: pavel <pavel.rosicky@easy.cz>
Co-authored-by: Jeremy Evans <code@jeremyevans.net>
2020-12-15 15:17:15 +09:00
Nobuyoshi Nakada 7898f4243f
ripper: return pushed new token instead of the token list 2020-12-15 10:26:50 +09:00
Alan Wu a5fd651575 Reword docs for Fiddle::Function#call [ci skip]
I'm using `<code>` instead of `+` since `+` only works when it encloses
a single word.
2020-12-14 18:26:32 -05:00
Hiroshi SHIBATA c2a60fec2f
Merge Psych-3.2.1 from ruby/psych 2020-12-14 20:13:12 +09:00
Masaki Matsushita 56918578ea Remove unimplemented parameter from comment
:resolv_timeout of TCPSocket.new is not implemented for now.
2020-12-11 11:13:24 +09:00
Kenta Murata 9b0c36b390
Import fiddle-1.0.4 (#3860)
I don't use tool/sync_default_gem.rb because the last sync was incomplete.

Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org>
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
Co-authored-by: sinisterchipmunk <sinisterchipmunk@gmail.com>
Co-authored-by: Sutou Kouhei <kou@clear-code.com>
2020-12-11 09:41:12 +09:00
Masaki Matsushita 78f188524f Add connect_timeout to TCPSocket
Add connect_timeout to TCPSocket.new in the same way as Socket.tcp.

Closes [Feature #17187]
2020-12-10 20:52:29 +09:00
Kenta Murata bb489aca58
memory_view.c: Add rb_memory_view_get_item and rb_memory_view_prepare_item_desc (#3871) 2020-12-10 00:24:36 +09:00
Kenta Murata 7e69296a2b
memory_view.c: Add rb_memory_view_extract_item_members (#3855) 2020-12-08 02:01:31 +09:00
Masaki Matsushita 5d8bcc4870 Revert getaddrinfo_a()
getaddrinfo_a() gets stuck after fork().
To avoid this, we need 1 second sleep to wait for internal
worker threads of getaddrinfo_a() to be finished, but that is unacceptable.

[Bug #17220] [Feature #17134] [Feature #17187]
2020-12-07 13:33:53 +09:00
Kenta Murata 60eabb1aa7
Revert "memory_view.c: Add rb_memory_view_extract_item_members"
This reverts the following three commits.

- ce707079c1
- 1a76bb56b0
- 51500eedef
2020-12-07 00:38:19 +09:00
Kenta Murata 51500eedef
memory_view.c: Add rb_memory_view_extract_item_members 2020-12-06 22:46:06 +09:00
Masaki Matsushita 76439eee68 Call cleanup function for getaddrinfo_a(3) only before fork()
Previously, rb_getaddrinfo_a_before_exec() is called from before_exec().
However, the function needs to be called only before fork().
The change moves it to before_fork().
2020-12-06 01:32:43 +09:00
Masaki Matsushita c56a1c1953 Extend sleep time to 1.5 second in rb_getaddrinfo_a_before_exec()
After 94d49ed31c, TestSocket#test_getaddrinfo_after_fork fails in some
platforms. To avoid this, the change extends sleep time to 1.5 second.
2020-12-06 01:01:13 +09:00
Nobuyoshi Nakada d2b7e1e4b2
Protoized old pre-ANSI K&R style definitions 2020-12-05 14:57:31 +09:00
Masaki Matsushita 94d49ed31c Add a hook before fork() for getaddrinfo_a()
We need stop worker threads in getaddrinfo_a() before fork().
This change adds a hook before fork() that cancel all outstanding requests
and wait for all ongoing requests. Then, it waits for all worker
threads to be finished.

Fixes [Bug #17220]
2020-12-04 23:31:51 +09:00
Jeremy Evans 0adc426ca5 [ruby/zlib] Add Zlib::Inflate#inflate :buffer keyword argument
If a buffer keyword argument is given, it is used as the buffer,
instead of creating new strings.  This can result in significantly
lower memory usage during inflation.

Implements #19

https://github.com/ruby/zlib/commit/dac9a9b57d
2020-12-04 19:12:32 +09:00
Jeremy Evans bc63ec57e7 [ruby/zlib] Allow Zlib.crc32 and .adler32 to accept IO instance
This reads from the IO in 8192 byte chunks, so you don't need to
have the entire string in memory.

Fixes #16

https://github.com/ruby/zlib/commit/ba9793c550
2020-12-04 19:12:20 +09:00
Jeremy Evans a60dfff434 [ruby/zlib] Document that gets can return nil when eof? returns false
This behavior differs from File#gets.

Fixes [Bug #13904]

https://github.com/ruby/zlib/commit/448e41efdd
2020-12-04 19:11:30 +09:00
aycabta 5b1ebb8ead
[ruby/readline-ext] Rename depend.gem with depend-gem
https://github.com/ruby/readline-ext/commit/897ffe26a6
2020-12-03 17:35:29 +09:00
aycabta b526db85fe
[ruby/readline-ext] Version 0.1.1
https://github.com/ruby/readline-ext/commit/6d55854434
2020-12-03 17:35:29 +09:00
aycabta b619197dfa
Use gemified depend 2020-12-03 17:35:29 +09:00
Nobuyoshi Nakada eab4aa4178
[ruby/io-wait] Added extensions
https://github.com/ruby/io-wait/commit/664c93b2ff
2020-12-03 17:35:29 +09:00
Nobuyoshi Nakada 09266eccf4
[ruby/io-wait] Fixed regexp to reject .travis* at the toplevel only
https://github.com/ruby/io-wait/commit/4434b10e46
2020-12-03 17:35:29 +09:00
Nobuyoshi Nakada 7fcbe07d61
[ruby/io-wait] Exclude dot-files for CIs
https://github.com/ruby/io-wait/commit/12cce69ddf
2020-12-03 17:35:29 +09:00
Nobuyoshi Nakada 09bcb935ec
[ruby/io-wait] Fix ls-files matching regexp
See rubygems/rubygems@8a81183236.

https://github.com/ruby/io-wait/commit/04857e0cf5
2020-12-03 17:35:29 +09:00
Nobuyoshi Nakada 2800e9f347
[ruby/io-nonblock] Added extensions
https://github.com/ruby/io-nonblock/commit/8b7abbd1b5
2020-12-03 17:35:29 +09:00
Nobuyoshi Nakada 7820162018
[ruby/io-nonblock] Exclude dot-files for CIs
https://github.com/ruby/io-nonblock/commit/9fa3ad9c7a
2020-12-03 17:35:28 +09:00
Nobuyoshi Nakada 7d0a6e28f2
[ruby/io-nonblock] Fix ls-files matching regexp
See rubygems/rubygems@8a81183236.

https://github.com/ruby/io-nonblock/commit/e14f7952c1
2020-12-03 17:35:28 +09:00
Hiroshi SHIBATA 412a0f5240
[ruby/digest] LICENSE
https://github.com/ruby/digest/commit/aa048ce345
2020-12-03 17:35:28 +09:00
Hiroshi SHIBATA 7324d76da4
[ruby/digest] Fixup d981714348f71177132426e3ac19598e1b2e8f5d
https://github.com/ruby/digest/commit/502a12587c
2020-12-03 17:35:28 +09:00
卜部昌平 43b95bafd5
delete deprecated IO-like methods
This commit deletes
{IO,ARGF,StringIO,Zib::GZipReader}#{bytes,chars,lines,codepoints}, which
have been deprecated since c47c095b97.

Note that String also has those methods.  They are neither depreacted
nor deleted because they are not aliases of counterpart each_something.
2020-12-03 12:47:51 +09:00
Kazuki Yamaguchi 2e601c284c digest: remove OpenSSL engine
The OpenSSL engine of Digest uses the low-level API of OpenSSL, whose
use has been discouraged for years for multiple reasons.

A long-standing issue on a FIPS-enabled system is that using ::Digest
results in crashing the Ruby process, because the low-level API lacks
the mechanism to report an error (the policy violation) and thus kills
the process as a last resort[1][2]. Also, the upcoming OpenSSL 3.0 will
deprecate it for future removal[3]. Compiling with
-Wdeprecated-declarations will start to emit warnings.

A proper fix for this is to make it use the EVP API instead. This is a
non-trivial work as it requires backwards-incompatible changes to the
framework interface of Digest::Base and rb_digest_metadata_t.

It is more than 15 years ago that the openssl library became part of the
standard library. It has implemented the exactly same functionality as
OpenSSL::Digest, in fact, as a subclass of Digest::Class. There is not
much point in having an identical code in the digest library. Let's
just get rid of OpenSSL within digest. This leaves the C implementations
and the CommonCrypto engine for Apple systems.

A patch is being prepared for the openssl library to provide ::Digest
constants for better performance[4].

[1] https://bugs.ruby-lang.org/issues/6946
[2] https://bugs.ruby-lang.org/issues/13681
[3] https://www.openssl.org/docs/OpenSSL300Design.html
[4] https://github.com/ruby/openssl/pull/377
2020-12-02 11:09:12 +09:00
Cristian Greco 95bb49d425 Fix code example in Readline::HISTORY documentation.
Wrapping the example into a <code> block to avoid it being rendered as a link.
2020-12-02 10:59:53 +09:00
Kenta Murata 82dc0c6aa3
memory_view.c: Check availability in rb_memory_view_get 2020-12-02 09:44:03 +09:00
Nobuyoshi Nakada d5e16161f6
Update ext/.document 2020-12-01 17:35:28 +09:00
Kazuhiro NISHIYAMA 1ca9facab6
Add monitor to document files 2020-12-01 16:07:38 +09:00
Jean Boussier 6bef49427a Fix rb_interned_str_* functions to not assume static strings
Fixes [Feature #13381]

When passed a `fake_str`, `register_fstring` would create new strings
with `str_new_static`. That's not what was expected, and answer
almost no use cases.
2020-11-30 17:33:28 +09:00
Kenta Murata 73a337e214
Keep references of memory-view-exported objects (#3816)
* memory_view.c: remove a reference in view->obj at rb_memory_view_release

* memory_view.c: keep references of memory-view-exported objects

* Update common.mk

* memory_view.c: Use st_update
2020-11-30 14:53:13 +09:00
Nobuyoshi Nakada f5ca3ff4db
Store all kinds of syntax errors [Bug #17345] 2020-11-26 20:14:34 +09:00
Nobuyoshi Nakada 48d1e8682c
zlib: patches for mswin64
* cast to suppress C4267 warnings; no possible loss of data as
  following the comparison.

* shift base address to suppress LNK4281; although /DYNAMICBASE is
  preferable, not sure from which version of link.exe supports it.
2020-11-24 08:27:08 +09:00
Nobuyoshi Nakada 78c40e6588
zlib: extlibs to download zlib-1.2.11 2020-11-24 08:22:54 +09:00
Lars Kanis d403591b34
Add string encoding IBM720 alias CP720 (#3803)
The mapping table is generated from the ICU project:
  https://github.com/unicode-org/icu/blob/master/icu4c/source/data/mappings/ibm-720_P100-1997.ucm

Fixes bug 16233 : https://bugs.ruby-lang.org/issues/16233
2020-11-22 22:23:40 +09:00
Nobuhiro IMAI 4f5d14eb8c [DOC] Ripper.{lex,tokenize} now always return full tokens. [ci skip] 2020-11-20 15:46:17 -08:00
Nobuyoshi Nakada 69d871eeeb
[Feature #17276] Moved raise_errors support to Ripper::Lexer#parse 2020-11-20 17:18:27 +09:00
Nobuhiro IMAI 1800f3fa5c
Ripper.{lex,tokenize} return full tokens even if syntax error
yet another implements [Feature #17276]
2020-11-20 11:44:57 +09:00
Kevin Murphy 0026f644d7 Document Different Coverage Modes
This commits adds in documentation to illustrate the different modes you
can start coverage with. Examples are provided to show how to start each
of these modes, along with an explanation of the mode and a description
of the output.
2020-11-20 09:24:46 +09:00
Jeremy Evans 1301bd8ca9 Update documentation for Ripper.{lex,tokenize,sexp,sexp_raw} [ci skip] 2020-11-17 21:26:56 -08:00
Jeremy Evans cd0877a93e
Support raise_errors keyword for Ripper.{lex,tokenize,sexp,sexp_raw}
Implements [Feature #17276]
2020-11-17 21:15:50 -08:00
Sutou Kouhei 0915a02068 Update Fiddle's dependencies 2020-11-18 09:05:13 +09:00
Sutou Kouhei fcd680fbf0 [ruby/fiddle] Remove needless return
https://github.com/ruby/fiddle/commit/50e02f9445
2020-11-18 09:05:13 +09:00
Sutou Kouhei aa22b6658a [ruby/fiddle] Bump version
https://github.com/ruby/fiddle/commit/74b65cb858
2020-11-18 09:05:13 +09:00
Sutou Kouhei ceccc16589 [ruby/fiddle] Remove needless workaround
It's fixed in upstream.
https://github.com/MSP-Greg/ruby-loco/issues/4

https://github.com/ruby/fiddle/commit/2ae0ff4934
2020-11-18 09:05:13 +09:00
Sutou Kouhei 3b385c33b8 [ruby/fiddle] Add workaround for ruby head for mingw
https://github.com/ruby/fiddle/commit/bb227c206d
2020-11-18 09:05:13 +09:00
Sutou Kouhei 821cfa74cb [ruby/fiddle] Use msys2_mingw_dependencies
https://github.com/ruby/fiddle/commit/fee175a8ff
2020-11-18 09:05:13 +09:00
Sutou Kouhei e27701291a [ruby/fiddle] Use ruby_xcalloc() instead of ruby_xmalloc() and memset()
https://github.com/ruby/fiddle/commit/6d24fb5438
2020-11-18 09:05:13 +09:00
Sutou Kouhei 1867088d90 [ruby/fiddle] Remove needless rescue
GitHub: fix GH-15

Reported by Eneroth3. Thanks!!!

https://github.com/ruby/fiddle/commit/f3d70b81ec
2020-11-18 09:05:13 +09:00
Sutou Kouhei aff5eaced4 [ruby/fiddle] Add workaround for RubyInstaller for Windows
See comment for details.

https://github.com/ruby/fiddle/commit/0c76f03dc4
2020-11-18 09:05:13 +09:00
Aaron Patterson 307388ea19 [ruby/fiddle] Add a "pinning" reference (#44)
* Add a "pinning" reference

A `Fiddle::Pinned` objects will prevent the objects they point to from
moving.  This is useful in the case where you need to pass a reference
to a C extension that keeps the address in a global and needs the
address to be stable.

For example:

```ruby
class Foo
  A = "hi" # this is an embedded string

  some_c_function A # A might move!
end
```

If `A` moves, then the underlying string buffer may also move.
`Fiddle::Pinned` will prevent the object from moving:

```ruby
class Foo
  A = "hi" # this is an embedded string

  A_pinner = Fiddle::Pinned.new(A) # :nodoc:

  some_c_function A # A can't move because of `Fiddle::Pinned`
end
```

This is a similar strategy to what Graal uses:

  https://www.graalvm.org/sdk/javadoc/org/graalvm/nativeimage/PinnedObject.html#getObject--

* rename global to match exception name

* Introduce generic Fiddle::Error and rearrange error classes

Fiddle::Error is the generic exception base class for Fiddle exceptions.
This commit introduces the class and rearranges Fiddle exceptions to
inherit from it.

https://github.com/ruby/fiddle/commit/ac52d00223
2020-11-18 09:05:13 +09:00
Sutou Kouhei e2dfc0c26b [ruby/fiddle] Add support for specifying types by name as String or Symbol
For example, :voidp equals to Fiddle::TYPE_VOID_P.

https://github.com/ruby/fiddle/commit/3b4de54899
2020-11-18 09:05:13 +09:00
Sutou Kouhei ae7b53546c [ruby/fiddle] Add TYPE_CONST_STRING and SIZEOF_CONST_STRING for "const char *"
Add rb_fiddle_ prefix to conversion functions.h to keep backward
compatibility but value_to_generic() isn't safe for TYPE_CONST_STRING
and not String src. Use rb_fiddle_value_to_generic() instead.

https://github.com/ruby/fiddle/commit/0ffcaa39e5
2020-11-18 09:05:13 +09:00
Koichi Sasada 5e3259ea74 fix public interface
To make some kind of Ractor related extensions, some functions
should be exposed.

* include/ruby/thread_native.h
  * rb_native_mutex_*
  * rb_native_cond_*
* include/ruby/ractor.h
  * RB_OBJ_SHAREABLE_P(obj)
  * rb_ractor_shareable_p(obj)
  * rb_ractor_std*()
  * rb_cRactor

and rm ractor_pub.h
and rename srcdir/ractor.h to srcdir/ractor_core.h
    (to avoid conflict with include/ruby/ractor.h)
2020-11-18 03:52:41 +09:00
Akira Matsuda 028d52bb94 [ruby/date] Numeric already includes Comparable
https://github.com/ruby/date/commit/f6140df0ad
2020-11-12 21:35:17 +09:00
Nobuyoshi Nakada 33574d57f1 [ruby/date] Updated timezones from timeanddate.com
https://github.com/ruby/date/commit/f08175e34d
2020-11-12 21:35:06 +09:00
Nobuyoshi Nakada 81dece54d6 [ruby/date] Honor timezones from timeanddate.com
https://github.com/ruby/date/commit/d20380fc55
2020-11-12 21:34:54 +09:00
Nobuyoshi Nakada d65f1140b9 [ruby/date] Fixed the script file name to update zonetab.list
https://github.com/ruby/date/commit/3c002b1daa
2020-11-12 21:34:43 +09:00
NARUSE, Yui 0fdcb947e8 [ruby/date] [DOC] declate DateTime class is deprecated
https://github.com/ruby/date/commit/58ca6e6a3e
2020-11-12 21:34:31 +09:00
Hiroshi SHIBATA dd07354f27 Use Fiddle::Importer directly 2020-11-11 09:27:36 +09:00
Hiroshi SHIBATA 5081bd9675 Removed win32/resolv.rb for 32bit env 2020-11-11 09:27:36 +09:00
Hiroshi SHIBATA ff67aac193 Removed win32api 2020-11-11 09:27:36 +09:00
NAKAMURA Usaku 9728cb730f
Use fiddle (win32/importer) instead of Win32API
- ext/win32/lib/win32/sspi.rb: Use fiddle (win32/importer) instead of Win32API
2020-11-10 14:45:15 +09:00
Hiroshi SHIBATA 17e7a819f7 Complex and Rational is embedded classes now 2020-11-10 13:14:42 +09:00
Rei Odaira 305c79af2f ext/socket/rubysocket.h: avoid the conflict of T_DATA definition in AIX 2020-11-01 00:12:55 -05:00
Hiroshi SHIBATA a1828a1ff4
Promote win32ole to default gems.
But win32ole gem is still experimental for 3.0.0-preview2.
  I'm working to extract this library on https://github.com/ruby/win32ole.
2020-10-30 15:18:50 +09:00
Aaron Patterson 9f3adaf529 Use public allocators for creating new T_OBJECT objects
This way the header flags and object internals are set correctly
2020-10-28 18:35:22 -07:00
Nobuyoshi Nakada 5a77e90fe8
Use rb_intern_const instead of rb_intern in Init functions
```
find . -name \*.o -exec nm {} + |&
sed '/Init_.*\.rbimpl_id/!d;s/^.* b //;s/\.[1-9][0-9]*$//;s/\.rbimpl_id$//' |
uniq
```
should be empty.
2020-10-21 12:46:53 +09:00
Stefan Stüben 8c2e5bbf58 Don't redefine #rb_intern over and over again 2020-10-21 12:45:18 +09:00
Nobuyoshi Nakada d497436d07
Update dependencies for macOS 2020-10-21 12:31:45 +09:00
Jean Boussier 520e0916af
Implement a freeze: parser option
If set to true all parsed objects will be
immediately frozen, and strings will be
deduplicated if the Ruby implementation
allows it.
2020-10-20 21:40:25 +09:00
Hiroshi SHIBATA 3f97940252
Followed up with 708413807a
* Added sync task for digest
  * Update doc/* for default gems
  * Update the latest version of gemspec
2020-10-19 18:56:19 +09:00
Hiroshi SHIBATA 708413807a
Revisit to promote digest to default gems.
This reverts commit f39021be7e.
2020-10-19 18:38:09 +09:00
Aaron Patterson ff9dc10966
keep proc on the stack so it does not move 2020-10-16 11:28:52 -07:00
Hiroshi SHIBATA 9aab916990
Promote pathname to default gems 2020-10-14 14:42:53 +09:00
Nobuyoshi Nakada 27b48089e2
Adjusted indents [ci skip] 2020-10-11 14:22:43 +09:00