summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Support raise_errors keyword for Ripper.{lex,tokenize,sexp,sexp_raw}Jeremy Evans2020-11-174-8/+53
| | | Implements [Feature #17276]
* Move the declaration into the functionKazuhiro NISHIYAMA2020-11-182-2/+6
| | | | instead of 'do not call it directly.' comment.
* Add Fiddle 1.0.2 to NEWSSutou Kouhei2020-11-181-0/+4
|
* Update Fiddle's dependenciesSutou Kouhei2020-11-181-79/+244
|
* [ruby/fiddle] Remove needless returnSutou Kouhei2020-11-181-1/+1
| | | | https://github.com/ruby/fiddle/commit/50e02f9445
* [ruby/fiddle] Bump versionSutou Kouhei2020-11-181-1/+1
| | | | https://github.com/ruby/fiddle/commit/74b65cb858
* [ruby/fiddle] test: suppress shadowing outer local variable warningSutou Kouhei2020-11-181-2/+2
| | | | https://github.com/ruby/fiddle/commit/cf168680a2
* [ruby/fiddle] Remove needless workaroundSutou Kouhei2020-11-181-3/+1
| | | | | | | It's fixed in upstream. https://github.com/MSP-Greg/ruby-loco/issues/4 https://github.com/ruby/fiddle/commit/2ae0ff4934
* [ruby/fiddle] Add workaround for ruby head for mingwSutou Kouhei2020-11-181-1/+3
| | | | https://github.com/ruby/fiddle/commit/bb227c206d
* [ruby/fiddle] Use msys2_mingw_dependenciesSutou Kouhei2020-11-181-0/+2
| | | | https://github.com/ruby/fiddle/commit/fee175a8ff
* [ruby/fiddle] Use ruby_xcalloc() instead of ruby_xmalloc() and memset()Sutou Kouhei2020-11-181-3/+1
| | | | https://github.com/ruby/fiddle/commit/6d24fb5438
* [ruby/fiddle] Remove needless rescueSutou Kouhei2020-11-181-5/+1
| | | | | | | | GitHub: fix GH-15 Reported by Eneroth3. Thanks!!! https://github.com/ruby/fiddle/commit/f3d70b81ec
* [ruby/fiddle] Add workaround for RubyInstaller for WindowsSutou Kouhei2020-11-181-0/+14
| | | | | | See comment for details. https://github.com/ruby/fiddle/commit/0c76f03dc4
* [ruby/fiddle] Add a "pinning" reference (#44)Aaron Patterson2020-11-187-12/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* [ruby/fiddle] Add support for specifying types by name as String or SymbolSutou Kouhei2020-11-186-47/+161
| | | | | | For example, :voidp equals to Fiddle::TYPE_VOID_P. https://github.com/ruby/fiddle/commit/3b4de54899
* [ruby/fiddle] Add TYPE_CONST_STRING and SIZEOF_CONST_STRING for "const char *"Sutou Kouhei2020-11-188-29/+121
| | | | | | | | 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
* test/net/smtp - use TCPSocket when UNIXSocket unavailableMSP-Greg2020-11-182-4/+6
|
* NEWS: Add --backtrace-limit option [ci skip]Junichi Ito2020-11-171-0/+5
|
* Remove NEWS entry about taint deprecation warnings [ci skip]Jeremy Evans2020-11-171-3/+0
| | | | | | JunichiIto on GitHub correctly pointed out this is no longer accurate due to the change to not display deprecation warnings by default.
* * 2020-11-18 [ci skip]git2020-11-181-1/+1
|
* fix public interfaceKoichi Sasada2020-11-1823-134/+120
| | | | | | | | | | | | | | | | | | 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)
* Skip tests related TLS with Windows platform.Hiroshi SHIBATA2020-11-172-2/+2
|
* Import net-smtp-0.2.0 from https://github.com/ruby/net-smtpHiroshi SHIBATA2020-11-174-28/+297
|
* configure.ac: fix for upcoming autoconf-2.70Sergei Trofimovich2020-11-171-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The failure initially noticed on `autoconf-2.69d` (soon to become 2.70): ``` $ ./configure ./configure: line 8720: syntax error near unexpected token `fi' ./configure: line 8720: `fi' ``` Before the change generated `./configure ` snippet looked like: ``` if ! $CC -E -xc - <<SRC >/dev/null then : #if defined __APPLE_CC__ && defined __clang_major__ && __clang_major__ < 3 #error premature clang #endif SRC as_fn_error $? "clang version 3.0 or later is required" "$LINENO" 5 fi ``` Note the newline that breaks here-document syntax. After the change the snippet does not use here-document. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Expose the rb_interned_str_* family of functionsJean Boussier2020-11-173-0/+35
| | | | Fixes [Feature #13381]
* Set allocator on class creationAlan Wu2020-11-162-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allocating an instance of a class uses the allocator for the class. When the class has no allocator set, Ruby looks for it in the super class (see rb_get_alloc_func()). It's uncommon for classes created from Ruby code to ever have an allocator set, so it's common during the allocation process to search all the way to BasicObject from the class with which the allocation is being performed. This makes creating instances of classes that have long ancestry chains more expensive than creating instances of classes have that shorter ancestry chains. Setting the allocator at class creation time removes the need to perform a search for the alloctor during allocation. This is a breaking change for C-extensions that assume that classes created from Ruby code have no allocator set. Libraries that setup a class hierarchy in Ruby code and then set the allocator on some parent class, for example, can experience breakage. This seems like an unusual use case and hopefully it is rare or non-existent in practice. Rails has many classes that have upwards of 60 elements in the ancestry chain and benchmark shows a significant improvement for allocating with a class that includes 64 modules. ``` pre: ruby 3.0.0dev (2020-11-12T14:39:27Z master 6325866421) post: ruby 3.0.0dev (2020-11-12T20:15:30Z cut-allocator-lookup) Comparison: allocate_8_deep post: 10336985.6 i/s pre: 8691873.1 i/s - 1.19x slower allocate_32_deep post: 10423181.2 i/s pre: 6264879.1 i/s - 1.66x slower allocate_64_deep post: 10541851.2 i/s pre: 4936321.5 i/s - 2.14x slower allocate_128_deep post: 10451505.0 i/s pre: 3031313.5 i/s - 3.45x slower ```
* Fix singleton class cloningAlan Wu2020-11-162-9/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, `clone` gave different results depending on whether the original object had an attached singleton class or not. Consider the following setup: ``` class Foo; end Foo.singleton_class.define_method(:foo) {} obj = Foo.new obj.singleton_class if $call_singleton clone = obj.clone ``` When `$call_singleton = false`, neither `obj.singleton_class.singleton_class` nor `clone.singleton_class.singleton_class` own any methods. However, when `$call_singleton = true`, `clone.singleton_class.singleton_class` would own a copy of `foo` from `Foo.singleton_class`, even though `obj.singleton_class.singleton_class` does not. The latter case is unexpected and results in a visibly different clone, depending on if the original object had an attached class or not. Co-authored-by: Ufuk Kayserilioglu <ufuk.kayserilioglu@shopify.com>
* remain enabled and line specified trace pointsKoichi Sasada2020-11-172-5/+33
| | | | | | | If two or more tracepoints enabled with the same target and with different target lines, the only last line is activated. This patch fixes this issue by remaining existing trace instructions. [Bug #17302]
* * 2020-11-17 [ci skip]git2020-11-171-1/+1
|
* Fix typo on Proc docsTomás Coêlho2020-11-161-1/+1
|
* [DOC] Fixed a typo [ci skip]Nobuyoshi Nakada2020-11-161-1/+1
|
* Update TypeProf to 0.5.2Yusuke Endoh2020-11-161-1/+1
|
* Update TypeProf to 0.5.1Soutaro Matsumoto2020-11-161-1/+1
|
* Update RBS to 0.17.0Soutaro Matsumoto2020-11-161-1/+1
|
* Fix a link [ci skip]Kazuhiro NISHIYAMA2020-11-161-0/+1
|
* Fix links [ci skip]Kazuhiro NISHIYAMA2020-11-161-1/+1
|
* Use more specific warning for ambiguous slashJeremy Evans2020-11-151-1/+6
| | | | Fixes [Bug #17124]
* * 2020-11-16 [ci skip]git2020-11-161-1/+1
|
* NEWS: merge Range and Regexp being frozen [doc]Marc-Andre Lafortune2020-11-151-7/+3
|
* * 2020-11-15 [ci skip]git2020-11-151-1/+1
|
* Functions defined in headers should be static inlineNobuyoshi Nakada2020-11-151-1/+1
|
* Update TypeProf to 0.5.0Yusuke Endoh2020-11-141-1/+1
|
* Use rb_attr_get() for hidden ivarAlan Wu2020-11-131-2/+2
| | | | | rb_ivar_get() can issue an uninitialized ivar warning. We never want to issue warnings about hidden ivars as they are not actionable for users.
* * 2020-11-14 [ci skip]git2020-11-141-1/+1
|
* Improve error message when subclassing non-ClassJeremy Evans2020-11-134-4/+4
| | | | Fixes [Bug #14726]
* Update to ruby/spec@b0b7f53Benoit Daloze2020-11-1327-77/+704
|
* Update to ruby/mspec@f8b0618Benoit Daloze2020-11-131-4/+0
|
* Fixup 957efa95cc12c608705a5663256226f022ea6c7fHiroshi SHIBATA2020-11-131-1/+1
|
* Revert https://github.com/ruby/webrick/pull/44Hiroshi SHIBATA2020-11-131-1/+1
| | | | Because the test for this change was still broken.
* * 2020-11-13 [ci skip]git2020-11-131-1/+1
|