summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-08-29Adapt specs for the new Tempfile.open with block behaviorBenoit Daloze
2020-08-29Sync with ruby/tempfile@aa9ea12d94a905161cbd79af1ad9ab427f250f4eBenoit Daloze
2020-08-29Some fixes in NEWS.mdBenoit Daloze
2020-08-29Fix warnings related to new Socket.gethostby* deprecationsBenoit Daloze
2020-08-29Use a constant instead of a global variable in sync_default_gems.rbBenoit Daloze
2020-08-29Show deprecation warning on Socket.gethostbyname and Socket.gethostbyaddrMasaki Matsushita
2020-08-29IO.copy_stream: handle EOPNOTSUP instead of ENOTSUPMasaki Matsushita
2020-08-29IO.copy_stream: handle ENOTSUP on copy_file_range(2)Masaki Matsushita
fallback to other methods on ENOTSUP. some RedHat kernels may return ENOTSUP on an NFS mount. [Feature #16965]
2020-08-29Fix a typo [ci skip]Kazuhiro NISHIYAMA
2020-08-28Comply with guide for method doc: array.c (#3469)Burdette Lamar
Methods: - freeze - try_convert - new - \<< - push - pop - shift - unshift - [] Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2020-08-28Add alias treatment to method_documentation.rdoc (#3468)Burdette Lamar
* Add alias treatment to method_documentation.rdoc Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2020-08-29* 2020-08-29 [ci skip]git
2020-08-28Update to ruby/spec@335eb9bBenoit Daloze
2020-08-28Update to ruby/mspec@53a6e3eBenoit Daloze
2020-08-28Try to fix compile error on windowsKazuhiro NISHIYAMA
https://github.com/ruby/ruby/runs/1041040167?check_suite_focus=true#step:11:177 ``` compiling ../src/re.c re.c ../src/re.c(317): error C2057: expected constant expression ../src/re.c(317): error C2466: cannot allocate an array of constant size 0 ../src/re.c(467): error C2057: expected constant expression ../src/re.c(467): error C2466: cannot allocate an array of constant size 0 ../src/re.c(467): error C2133: 'opts': unknown size ../src/re.c(559): error C2057: expected constant expression ../src/re.c(559): error C2466: cannot allocate an array of constant size 0 ../src/re.c(559): error C2133: 'optbuf': unknown size ../src/re.c(673): error C2057: expected constant expression ../src/re.c(673): error C2466: cannot allocate an array of constant size 0 ../src/re.c(673): error C2133: 'opts': unknown size NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\HostX64\x64\cl.EXE"' : return code '0x2' Stop. ```
2020-08-28States Time.at expects rational-like argument to respond to #to_intNobuyoshi Nakada
https://bugs.ruby-lang.org/issues/17131
2020-08-28Named the magic number for regexp option buffer sizeNobuyoshi Nakada
In `rb_enc_reg_error_desc`, no longer kcode option is added.
2020-08-28[ruby/reline] Move width calculator methods to Reline::Unicodeaycabta
https://github.com/ruby/reline/commit/f348ecd9f5
2020-08-28[ruby/reline] fix cursor_pos regexp matchtompng
https://github.com/ruby/reline/commit/1dd80ef188
2020-08-28[ruby/irb] Discard newlines at end of fileaycabta
https://github.com/ruby/irb/commit/0b2773d91d
2020-08-27Improve performance of partial backtracesJeremy Evans
Previously, backtrace_each fully populated the rb_backtrace_t with all backtrace frames, even if caller only requested a partial backtrace (e.g. Kernel#caller_locations(1, 1)). This changes backtrace_each to only add the requested frames to the rb_backtrace_t. To do this, backtrace_each needs to be passed the starting frame and number of frames values passed to Kernel#caller or #caller_locations. backtrace_each works from the top of the stack to the bottom, where the bottom is the current frame. Due to how the location for cfuncs is tracked using the location of the previous iseq, we need to store an extra frame for the previous iseq if we are limiting the backtrace and final backtrace frame (the first one stored) would be a cfunc and not an iseq. To limit the amount of work in this case, while scanning until the start of the requested backtrace, for each iseq, store the cfp. If the first backtrace frame we care about is a cfunc, use the stored cfp to find the related iseq. Use a function pointer to handle the storage of the cfp in the iteration arg, and also store the location of the extra frame in the iteration arg. backtrace_each needs to return int instead of void in order to signal when a starting frame larger than backtrace size is given, as caller and caller_locations needs to return nil and not the empty array in these cases. To handle cases where a range is provided with a negative end, and the backtrace size is needed to calculate the result to pass to rb_range_beg_len, add a backtrace_size static function to calculate the size, which copies the logic from backtrace_each. As backtrace_each only adds the backtrace lines requested, backtrace_to_*_ary can be simplified to always operate on the entire backtrace. Previously, caller_locations(1,1) was about 6.2 times slower for an 800 deep callstack compared to an empty callstack. With this new approach, it is only 1.3 times slower. It will always be somewhat slower as it still needs to scan the cfps from the top of the stack until it finds the first requested backtrace frame. This initializes the backtrace memory to zero. I do not think this is necessary, as from my analysis, nothing during the setting of the backtrace entries can cause a garbage collection, but it seems the safest approach, and it's unlikely the performance decrease is significant. This removes the rb_backtrace_t backtrace_base member. backtrace and backtrace_base were initialized to the same value, and neither is modified, so it doesn't make sense to have two pointers. This also removes LOCATION_TYPE_IFUNC from vm_backtrace.c, as the value is never set. Fixes [Bug #17031] Notes: Merged: https://github.com/ruby/ruby/pull/3441 Merged-By: jeremyevans <code@jeremyevans.net>
2020-08-27Comply with guide for method doc: hash.c (#3466)Burdette Lamar
Instance methods considered (most unchanged): - any - dig - \<= - \< - \>= - \> - to_proc Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2020-08-27Comply with guide for method doc: hash.c (#3465)Burdette Lamar
Instance methods considered (maybe not all changed): invert merge! merge assoc rassoc flatten compact compact! compare_by_identity compare_by_identity? Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2020-08-27Comply with guide for method doc: hash.c (#3464)Burdette Lamar
Instance methods considered (maybe not all changed): to_a inspect to_hash to_h keys values include? has_value? == eql? hash Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2020-08-28Show deprecation warning on TCPSocket.gethostbynameMasaki Matsushita
2020-08-27add T_ZOMBIE support to lldb scriptsAaron Patterson
2020-08-27Fix Method#super_method for aliased methodsJeremy Evans
Previously, Method#super_method looked at the called_id to determine the method id to use, but that isn't correct for aliased methods, because the super target depends on the original method id, not the called_id. Additionally, aliases can reference methods defined in other classes and modules, and super lookup needs to start in the super of the defined class in such cases. This adds tests for Method#super_method for both types of aliases, one that uses VM_METHOD_TYPE_ALIAS and another that does not. Both check that the results for calling super methods return the expected values. To find the defined class for alias methods, add an rb_ prefix to find_defined_class_by_owner in vm_insnhelper.c and make it non-static, so that it can be called from method_super_method in proc.c. This bug was original discovered while researching [Bug #11189]. Fixes [Bug #17130] Notes: Merged: https://github.com/ruby/ruby/pull/3458 Merged-By: jeremyevans <code@jeremyevans.net>
2020-08-28* 2020-08-28 [ci skip]git
2020-08-27[ruby/stringio] Bump version to 0.1.4Nobuyoshi Nakada
https://github.com/ruby/stringio/commit/64f2360d38
2020-08-27[ruby/io-console] Bug 17128: In test_set_winsize_console, wrapped re-size in ↵Leam Hall
a begin-rescue-else. https://github.com/ruby/io-console/commit/a22333c33a
2020-08-27[stringio] fix stringio codepoint enumerator off by one errorYoann Lecuyer
Notes: Merged: https://github.com/ruby/ruby/pull/3460
2020-08-27Adjust indents [ci skip]Nobuyoshi Nakada
2020-08-27Comply with guide for method doc: hash.c (#3459)Burdette Lamar
Instance methods considered (some maybe not changed): clear []= replace length empty? each_value each_key each_pair transform_keys transform_keys! transform_values transform_values! Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2020-08-27sed -i '/rmodule.h/d'卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3347
2020-08-27include/ruby/backward/2/rmodule.h: deprecate卜部昌平
Only one function in only one file uses contents of this public header. That is not a wise idea. Let's just free the header's soul. Notes: Merged: https://github.com/ruby/ruby/pull/3347
2020-08-27Make Socket.getaddrinfo interruptible (#2827)Kir Shatrov
Before, Socket.getaddrinfo was using a blocking getaddrinfo(3) call. That didn't allow to wrap it into Timeout.timeout or interrupt the thread in any way. Combined with the default 10 sec resolv timeout on many Unix systems, this can have a very noticeable effect on production Ruby apps being not resilient to DNS outages and timing out name resolution, and being unable to fail fast even with Timeout.timeout. Since we already have support for getaddrinfo_a(3), the async version of getaddrinfo, we should be able to make Socket.getaddrinfo leverage that when getaddrinfo_a version is available in the system (hence #ifdef HAVE_GETADDRINFO_A). Related tickets: https://bugs.ruby-lang.org/issues/16476 https://bugs.ruby-lang.org/issues/16381 https://bugs.ruby-lang.org/issues/14997 Notes: Merged-By: mmasaki <glass.saga@gmail.com>
2020-08-27RUBY_SHOW_COPYRIGHT_TO_DIE: flip the default卜部昌平
Commit 7aab062ef3772c7e8e50fc872a1647918c76dbba says: > ruby_show_version() will no longer exits the process, if > RUBY_SHOW_COPYRIGHT_TO_DIE is set to 0. This will be the default in > the future. 3.0 is a good timing for that "future". Notes: Merged: https://github.com/ruby/ruby/pull/3342
2020-08-27sed -i '/r_cast.h/d'卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3346
2020-08-27include/ruby/backward/2/r_cast.h: deprecate卜部昌平
Remove all usages of RCAST() so that the header file can be excluded from ruby/ruby.h's dependency. Notes: Merged: https://github.com/ruby/ruby/pull/3346
2020-08-27improve deprecation warning卜部昌平
We should not recommend RBIMPL_*. Notes: Merged: https://github.com/ruby/ruby/pull/3341
2020-08-27DEPRECATED_TYPE: is deprecated卜部昌平
Nobody uses this macro any longer. Notes: Merged: https://github.com/ruby/ruby/pull/3341
2020-08-27RClassDeprecated: delete卜部昌平
It has been deprecated for 5 years since 1f2255604087e9a7d7efcb2df61b5ca0e2daa200. Notes: Merged: https://github.com/ruby/ruby/pull/3341
2020-08-27Use own mutex instead of Thread.exclusiveKazuhiro NISHIYAMA
ref [Feature #17125]
2020-08-27git rm include/ruby/backward/rubyio.h卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3344
2020-08-27git rm include/ruby/backward/rubysig.h卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3343
2020-08-27git rm include/ruby/backward/{st,util}.h卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3345
2020-08-27* 2020-08-27 [ci skip]git
2020-08-27rb_deprecated_classext_struct: delete卜部昌平
Used from nowhere any longer. Notes: Merged: https://github.com/ruby/ruby/pull/3340
2020-08-27git rm include/ruby/backward/classext.h卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3340
2020-08-27sed -i '\,2/extern.h,d'卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3338