summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-11-17configure.ac: fix for upcoming autoconf-2.70Sergei Trofimovich
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> Notes: Merged: https://github.com/ruby/ruby/pull/3773
2020-11-17Expose the rb_interned_str_* family of functionsJean Boussier
Fixes [Feature #13381] Notes: Merged: https://github.com/ruby/ruby/pull/3586
2020-11-16Set allocator on class creationAlan Wu
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 ``` Notes: Merged: https://github.com/ruby/ruby/pull/3764
2020-11-16Fix singleton class cloningAlan Wu
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> Notes: Merged: https://github.com/ruby/ruby/pull/3761
2020-11-17remain enabled and line specified trace pointsKoichi Sasada
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] Notes: Merged: https://github.com/ruby/ruby/pull/3770
2020-11-17* 2020-11-17 [ci skip]git
2020-11-16Fix typo on Proc docsTomás Coêlho
Notes: Merged: https://github.com/ruby/ruby/pull/3772
2020-11-16[DOC] Fixed a typo [ci skip]Nobuyoshi Nakada
2020-11-16Update TypeProf to 0.5.2Yusuke Endoh
2020-11-16Update TypeProf to 0.5.1Soutaro Matsumoto
Notes: Merged: https://github.com/ruby/ruby/pull/3765
2020-11-16Update RBS to 0.17.0Soutaro Matsumoto
Notes: Merged: https://github.com/ruby/ruby/pull/3765
2020-11-16Fix a link [ci skip]Kazuhiro NISHIYAMA
2020-11-16Fix links [ci skip]Kazuhiro NISHIYAMA
2020-11-15Use more specific warning for ambiguous slashJeremy Evans
Fixes [Bug #17124] Notes: Merged: https://github.com/ruby/ruby/pull/3767
2020-11-16* 2020-11-16 [ci skip]git
2020-11-15NEWS: merge Range and Regexp being frozen [doc]Marc-Andre Lafortune
2020-11-15* 2020-11-15 [ci skip]git
2020-11-15Functions defined in headers should be static inlineNobuyoshi Nakada
2020-11-14Update TypeProf to 0.5.0Yusuke Endoh
2020-11-13Use rb_attr_get() for hidden ivarAlan Wu
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. Notes: Merged: https://github.com/ruby/ruby/pull/3763
2020-11-14* 2020-11-14 [ci skip]git
2020-11-13Improve error message when subclassing non-ClassJeremy Evans
Fixes [Bug #14726] Notes: Merged: https://github.com/ruby/ruby/pull/3330
2020-11-13Update to ruby/spec@b0b7f53Benoit Daloze
2020-11-13Update to ruby/mspec@f8b0618Benoit Daloze
2020-11-13Fixup 957efa95cc12c608705a5663256226f022ea6c7fHiroshi SHIBATA
2020-11-13Revert https://github.com/ruby/webrick/pull/44Hiroshi SHIBATA
Because the test for this change was still broken.
2020-11-13* 2020-11-13 [ci skip]git
2020-11-13[ruby/webrick] add mime type of extention .mjshisanori
https://github.com/ruby/webrick/commit/45d68f9eba
2020-11-13[ruby/webrick] Allow empty POST and PUT requests without content lengthJeremy Evans
RFC 7230 section 3.3.3 allows for this. Fixes #30 https://github.com/ruby/webrick/commit/069e9b1908
2020-11-12spec/ruby/core/file/utime_spec.rb: XFS seems to have Year 2038 problemYusuke Endoh
https://rubyci.org/logs/rubyci.s3.amazonaws.com/rhel8/ruby-master/log/20201112T123004Z.fail.html.gz ``` 1) File.utime allows Time instances in the far future to set mtime and atime (but some filesystems limit it up to 2446-05-10) FAILED Expected [559444, 2446].include? 2038 to be truthy but was false /home/chkbuild/chkbuild/tmp/build/20201112T123004Z/ruby/spec/ruby/core/file/utime_spec.rb:80:in `block (4 levels) in <top (required)>' /home/chkbuild/chkbuild/tmp/build/20201112T123004Z/ruby/spec/ruby/core/file/utime_spec.rb:3:in `<top (required)>' ``` ``` $ touch foo $ ./miniruby -e 'time = Time.at(1<<44); File.utime(time, time, "foo")' $ ls -l foo -rw-r--r--. 1 mame wheel 0 Jan 19 2038 foo ```
2020-11-12[ruby/date] Numeric already includes ComparableAkira Matsuda
https://github.com/ruby/date/commit/f6140df0ad
2020-11-12[ruby/date] Updated timezones from timeanddate.comNobuyoshi Nakada
https://github.com/ruby/date/commit/f08175e34d
2020-11-12[ruby/date] Honor timezones from timeanddate.comNobuyoshi Nakada
https://github.com/ruby/date/commit/d20380fc55
2020-11-12[ruby/date] Fixed the script file name to update zonetab.listNobuyoshi Nakada
https://github.com/ruby/date/commit/3c002b1daa
2020-11-12[ruby/date] [DOC] declate DateTime class is deprecatedNARUSE, Yui
https://github.com/ruby/date/commit/58ca6e6a3e
2020-11-12Backport cosmetic changes from upstream repo that is ruby/rdocHiroshi SHIBATA
2020-11-12Fixed typoHiroshi SHIBATA
2020-11-12strip trailing spaces and adjusted indents [ci skip]Nobuyoshi Nakada
2020-11-12* 2020-11-12 [ci skip]git
2020-11-12array.rb: Remove unnecessary phrase from rdocYusuke Endoh
A fix to 54fb8fb62a30c7b60ab6443a62821f6f8bc479c4
2020-11-12array.rb: show examples whether `Array#shuffle!` has side effect or notYusuke Endoh
Partially revert 54fb8fb62a30c7b60ab6443a62821f6f8bc479c4
2020-11-11remove Ractor#closeKoichi Sasada
close_incoming by antoher ractor means there is no other messages will be sent to the ractor, so Ractor.receive will block forever, and it should raise and stop. close_outgoing by antoher ractor means, ... I don't have good idea to use it. It can be a private method. Ractor#close calls both, but it does not make sense to call different purpose methods, so I remove it. Notes: Merged: https://github.com/ruby/ruby/pull/3759
2020-11-11ignore yield_atexit if outgoing port is closedKoichi Sasada
If outgoing_port is closed, Ractor.yield never successes. [Bug #17310] Notes: Merged: https://github.com/ruby/ruby/pull/3755
2020-11-11Threads in a ractor will be killed with the ractorKoichi Sasada
If a terminating ractor has child threads, then kill all child threads. Notes: Merged: https://github.com/ruby/ruby/pull/3754
2020-11-11introduce USE_VM_CLOCK for windows.Koichi Sasada
The timer function used on windows system set timer interrupt flag of current main ractor's executing ec and thread can detect the end of time slice. However, to set all ec->interrupt_flag for all running ractors, it is requires to synchronize with other ractors. However, timer thread can not acquire the ractor-wide lock because of some limitation. To solve this issue, this patch introduces USE_VM_CLOCK compile option to introduce rb_vm_t::clock. This clock will be incremented by the timer thread and each thread can check the incrementing by comparison with previous checked clock. At last, on windows platform this patch introduces some overhead, but I think there is no critical performance issue because of this modification. Notes: Merged: https://github.com/ruby/ruby/pull/3754
2020-11-11Use Fiddle::Importer directlyHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3712
2020-11-11Removed win32/resolv.rb for 32bit envHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3712
2020-11-11Removed win32apiHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3712
2020-11-11* 2020-11-11 [ci skip]git
2020-11-10Fix some typos in NEWS.md.Fabio Sangiovanni
Notes: Merged: https://github.com/ruby/ruby/pull/3756