summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2020-12-06Call cleanup function for getaddrinfo_a(3) only before fork()Masaki Matsushita
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-06Extend sleep time to 1.5 second in rb_getaddrinfo_a_before_exec()Masaki Matsushita
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-05Protoized old pre-ANSI K&R style definitionsNobuyoshi Nakada
2020-12-04Add a hook before fork() for getaddrinfo_a()Masaki Matsushita
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[ruby/zlib] Add Zlib::Inflate#inflate :buffer keyword argumentJeremy Evans
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[ruby/zlib] Allow Zlib.crc32 and .adler32 to accept IO instanceJeremy Evans
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[ruby/zlib] Document that gets can return nil when eof? returns falseJeremy Evans
This behavior differs from File#gets. Fixes [Bug #13904] https://github.com/ruby/zlib/commit/448e41efdd
2020-12-03[ruby/readline-ext] Rename depend.gem with depend-gemaycabta
https://github.com/ruby/readline-ext/commit/897ffe26a6
2020-12-03[ruby/readline-ext] Version 0.1.1aycabta
https://github.com/ruby/readline-ext/commit/6d55854434
2020-12-03Use gemified dependaycabta
2020-12-03[ruby/io-wait] Added extensionsNobuyoshi Nakada
https://github.com/ruby/io-wait/commit/664c93b2ff
2020-12-03[ruby/io-wait] Fixed regexp to reject .travis* at the toplevel onlyNobuyoshi Nakada
https://github.com/ruby/io-wait/commit/4434b10e46
2020-12-03[ruby/io-wait] Exclude dot-files for CIsNobuyoshi Nakada
https://github.com/ruby/io-wait/commit/12cce69ddf
2020-12-03[ruby/io-wait] Fix ls-files matching regexpNobuyoshi Nakada
See rubygems/rubygems@8a81183236c4475152798db99734e89779287331. https://github.com/ruby/io-wait/commit/04857e0cf5
2020-12-03[ruby/io-nonblock] Added extensionsNobuyoshi Nakada
https://github.com/ruby/io-nonblock/commit/8b7abbd1b5
2020-12-03[ruby/io-nonblock] Exclude dot-files for CIsNobuyoshi Nakada
https://github.com/ruby/io-nonblock/commit/9fa3ad9c7a
2020-12-03[ruby/io-nonblock] Fix ls-files matching regexpNobuyoshi Nakada
See rubygems/rubygems@8a81183236c4475152798db99734e89779287331. https://github.com/ruby/io-nonblock/commit/e14f7952c1
2020-12-03[ruby/digest] LICENSEHiroshi SHIBATA
https://github.com/ruby/digest/commit/aa048ce345
2020-12-03[ruby/digest] Fixup d981714348f71177132426e3ac19598e1b2e8f5dHiroshi SHIBATA
https://github.com/ruby/digest/commit/502a12587c
2020-12-03delete deprecated IO-like methods卜部昌平
This commit deletes {IO,ARGF,StringIO,Zib::GZipReader}#{bytes,chars,lines,codepoints}, which have been deprecated since c47c095b9740e7c19d6fdca29ab661c1089221d4. Note that String also has those methods. They are neither depreacted nor deleted because they are not aliases of counterpart each_something.
2020-12-02digest: remove OpenSSL engineKazuki Yamaguchi
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 Notes: Merged: https://github.com/ruby/ruby/pull/3149
2020-12-02Fix code example in Readline::HISTORY documentation.Cristian Greco
Wrapping the example into a <code> block to avoid it being rendered as a link. Notes: Merged: https://github.com/ruby/ruby/pull/3686
2020-12-02memory_view.c: Check availability in rb_memory_view_getKenta Murata
2020-12-01Update ext/.documentNobuyoshi Nakada
2020-12-01Add monitor to document filesKazuhiro NISHIYAMA
2020-11-30Fix rb_interned_str_* functions to not assume static stringsJean Boussier
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. Notes: Merged: https://github.com/ruby/ruby/pull/3786
2020-11-30Keep references of memory-view-exported objects (#3816)Kenta Murata
* 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 Notes: Merged-By: mrkn <mrkn@ruby-lang.org>
2020-11-26Store all kinds of syntax errors [Bug #17345]Nobuyoshi Nakada
2020-11-24zlib: patches for mswin64Nobuyoshi Nakada
* 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-24zlib: extlibs to download zlib-1.2.11Nobuyoshi Nakada
2020-11-22Add string encoding IBM720 alias CP720 (#3803)Lars Kanis
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 Notes: Merged-By: nurse <naruse@airemix.jp>
2020-11-20[DOC] Ripper.{lex,tokenize} now always return full tokens. [ci skip]Nobuhiro IMAI
Notes: Merged: https://github.com/ruby/ruby/pull/3797
2020-11-20[Feature #17276] Moved raise_errors support to Ripper::Lexer#parseNobuyoshi Nakada
2020-11-20Ripper.{lex,tokenize} return full tokens even if syntax errorNobuhiro IMAI
yet another implements [Feature #17276]
2020-11-20Document Different Coverage ModesKevin Murphy
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. Notes: Merged: https://github.com/ruby/ruby/pull/3792
2020-11-17Update documentation for Ripper.{lex,tokenize,sexp,sexp_raw} [ci skip]Jeremy Evans
2020-11-17Support raise_errors keyword for Ripper.{lex,tokenize,sexp,sexp_raw}Jeremy Evans
Implements [Feature #17276] Notes: Merged: https://github.com/ruby/ruby/pull/3774 Merged-By: jeremyevans <code@jeremyevans.net>
2020-11-18Update Fiddle's dependenciesSutou Kouhei
Notes: Merged: https://github.com/ruby/ruby/pull/3780
2020-11-18[ruby/fiddle] Remove needless returnSutou Kouhei
https://github.com/ruby/fiddle/commit/50e02f9445 Notes: Merged: https://github.com/ruby/ruby/pull/3780
2020-11-18[ruby/fiddle] Bump versionSutou Kouhei
https://github.com/ruby/fiddle/commit/74b65cb858 Notes: Merged: https://github.com/ruby/ruby/pull/3780
2020-11-18[ruby/fiddle] Remove needless workaroundSutou Kouhei
It's fixed in upstream. https://github.com/MSP-Greg/ruby-loco/issues/4 https://github.com/ruby/fiddle/commit/2ae0ff4934 Notes: Merged: https://github.com/ruby/ruby/pull/3780
2020-11-18[ruby/fiddle] Add workaround for ruby head for mingwSutou Kouhei
https://github.com/ruby/fiddle/commit/bb227c206d Notes: Merged: https://github.com/ruby/ruby/pull/3780
2020-11-18[ruby/fiddle] Use msys2_mingw_dependenciesSutou Kouhei
https://github.com/ruby/fiddle/commit/fee175a8ff Notes: Merged: https://github.com/ruby/ruby/pull/3780
2020-11-18[ruby/fiddle] Use ruby_xcalloc() instead of ruby_xmalloc() and memset()Sutou Kouhei
https://github.com/ruby/fiddle/commit/6d24fb5438 Notes: Merged: https://github.com/ruby/ruby/pull/3780
2020-11-18[ruby/fiddle] Remove needless rescueSutou Kouhei
GitHub: fix GH-15 Reported by Eneroth3. Thanks!!! https://github.com/ruby/fiddle/commit/f3d70b81ec Notes: Merged: https://github.com/ruby/ruby/pull/3780
2020-11-18[ruby/fiddle] Add workaround for RubyInstaller for WindowsSutou Kouhei
See comment for details. https://github.com/ruby/fiddle/commit/0c76f03dc4 Notes: Merged: https://github.com/ruby/ruby/pull/3780
2020-11-18[ruby/fiddle] Add a "pinning" reference (#44)Aaron Patterson
* 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 Notes: Merged: https://github.com/ruby/ruby/pull/3780
2020-11-18[ruby/fiddle] Add support for specifying types by name as String or SymbolSutou Kouhei
For example, :voidp equals to Fiddle::TYPE_VOID_P. https://github.com/ruby/fiddle/commit/3b4de54899 Notes: Merged: https://github.com/ruby/ruby/pull/3780
2020-11-18[ruby/fiddle] Add TYPE_CONST_STRING and SIZEOF_CONST_STRING for "const char *"Sutou Kouhei
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 Notes: Merged: https://github.com/ruby/ruby/pull/3780
2020-11-18fix public interfaceKoichi Sasada
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) Notes: Merged: https://github.com/ruby/ruby/pull/3775