summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-02-24[DOC] Fix typo in yjit docseileencodes
I noticed this yesterday when pairing with Aaron, there was an extra "e" in "callees". Notes: Merged: https://github.com/ruby/ruby/pull/5597
2022-02-25* 2022-02-25 [ci skip]git
2022-02-24Add ABI version to ruby_version tag on WindowsPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/5595
2022-02-24Add ABI version to RUBY_LIB_VERSIONPeter Zhu
This commit adds the ABI version as build metadata to RUBY_LIB_VERSION. This will ensure that gems are installed in a path with the ABI version. Notes: Merged: https://github.com/ruby/ruby/pull/5591
2022-02-23Constant time class to class ancestor lookupJohn Hawthorn
Previously when checking ancestors, we would walk all the way up the ancestry chain checking each parent for a matching class or module. I believe this was especially unfriendly to CPU cache since for each step we need to check two cache lines (the class and class ext). This check is used quite often in: * case statements * rescue statements * Calling protected methods * Class#is_a? * Module#=== * Module#<=> I believe it's most common to check a class against a parent class, to this commit aims to improve that (unfortunately does not help checking for an included Module). This is done by storing on each class the number and an array of all parent classes, in order (BasicObject is at index 0). Using this we can check whether a class is a subclass of another in constant time since we know the location to expect it in the hierarchy. Notes: Merged: https://github.com/ruby/ruby/pull/5568
2022-02-23Never call kind_of with klass=0John Hawthorn
Notes: Merged: https://github.com/ruby/ruby/pull/5568
2022-02-24* 2022-02-24 [ci skip]git
2022-02-23rb_provide_feature: Prevent $LOADED_FEATURES from being copiedJean Boussier
[Bug #18599] `vm->loaded_features` and `vm->loaded_features_snapshot` both share the same root. When a feature is pushed into `loaded_features`, the sharing is broken and `loaded_features` is copied. So an application requiring 1000 files, will allocate 1000 arrays of increasing size, which is very wasteful. To avoid this, we first clear the snapshot, so that `loaded_features` can directly be pushed into. Co-Authored-By: Peter Zhu <peter.zhu@shopify.com> Notes: Merged: https://github.com/ruby/ruby/pull/5593
2022-02-23Use rb_ary_behead for rb_ary_shiftPeter Zhu
rb_ary_shift is just a special case of rb_ary_behead where we behead only 1 element. Notes: Merged: https://github.com/ruby/ruby/pull/5590
2022-02-23Update bundled gems list at 2022-02-23git
2022-02-23Rename the wrong variable name `beg` to `len`Shugo Maeda
2022-02-22Update ext/-test-/dln/empty/dependPeter Zhu
Dependencies was not updated in 06dab12717a05bf49e4c6dff1d6f5458678d0e00.
2022-02-22Include ruby.h in empty.c to have ABI versionPeter Zhu
I forgot to include this as part of 638fd8774bed27b997f3b634ba8be7aa304be3c3.
2022-02-23* 2022-02-23 [ci skip]git
2022-02-22Fix compiler warning for uninitialized variablePeter Zhu
Fixes this compiler warning: warning: 'loc' may be used uninitialized in this function [-Wmaybe-uninitialized] bt_yield_loc(loc - cfunc_counter, cfunc_counter, btobj);
2022-02-22[Feature #18249] Update dependenciesPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/5474
2022-02-22[Feature #18249] Include ruby.h in extensions to have ABI versionPeter Zhu
All shared libraries must have `include/ruby/internal/abi.h` to include the ABI version. Including `ruby.h` will guarantee that. Notes: Merged: https://github.com/ruby/ruby/pull/5474
2022-02-22[Feature #18249] Implement ABI checkingPeter Zhu
Header file include/ruby/internal/abi.h contains RUBY_ABI_VERSION which is the ABI version. This value should be bumped whenever an ABI incompatible change is introduced. When loading dynamic libraries, Ruby will compare its own `ruby_abi_version` and the `ruby_abi_version` of the loaded library. If these two values don't match it will raise a `LoadError`. This feature can also be turned off by setting the environment variable `RUBY_RUBY_ABI_CHECK=0`. This feature will prevent cases where previously installed native gems fail in unexpected ways due to incompatibility of changes in header files. This will force the developer to recompile their gems to use the same header files as the built Ruby. In Ruby, the ABI version is exposed through `RbConfig::CONFIG["ruby_abi_version"]`. Notes: Merged: https://github.com/ruby/ruby/pull/5474
2022-02-22[ruby/reline] Fix support for emacs-ctlx and emacs-meta keymapsTim Pope
The existing implementation, given the below .inputrc, erroneously creates a "C-v" key binding: set keymap emacs-ctlx "\C-v": "[C-x C-v was pressed]" This fixes it to instead create a "C-x C-v" keybinding. https://github.com/ruby/reline/commit/719f52d231
2022-02-22[ruby/zlib] [DOC] Fix typo in Zlib.adler32_combineMau Magnaguagno
https://github.com/ruby/zlib/commit/5e8f0b4164
2022-02-22[ruby/rdoc] Prefer `require 'cgi/util'` instead of `require 'cgi'`Yusuke Endoh
RDoc is using only CGI.escape, escapeHTML, and unescape. We don't have to load the whole source code of cgi gem. https://github.com/ruby/rdoc/commit/d096222cc2
2022-02-22[rubygems/rubygems] Resolve cleaned-up error with temporary gemhomeHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/623162ad2b
2022-02-22* 2022-02-22 [ci skip]git
2022-02-22Factor a "highlight" symbol outYusuke Endoh
Notes: Merged: https://github.com/ruby/ruby/pull/5516
2022-02-22Remove unneeded newline from detailed_messageYusuke Endoh
Notes: Merged: https://github.com/ruby/ruby/pull/5516
2022-02-22Add a test for Exception#detailed_messageYusuke Endoh
Notes: Merged: https://github.com/ruby/ruby/pull/5516
2022-02-22Let Exception#full_message pass highlight keywords to #detailed_messageYusuke Endoh
.. even when the argument is not explicitly passed. Notes: Merged: https://github.com/ruby/ruby/pull/5516
2022-02-22test/ruby/test_rubyoptions.rb: Make it pass on WindowsYusuke Endoh
Notes: Merged: https://github.com/ruby/ruby/pull/5516
2022-02-22The default highlight arguments of Exception#detailed_message is falseYusuke Endoh
Notes: Merged: https://github.com/ruby/ruby/pull/5516
2022-02-22Exception#detailed_message is addedYusuke Endoh
Also, the default error printer and Exception#full_message use the method instead of `Exception#message` to get the message string. `Exception#detailed_message` calls `Exception#message`, decorates and returns the result. It adds some escape sequences to highlight, and the class name of the exception to the end of the first line of the message. [Feature #18370] Notes: Merged: https://github.com/ruby/ruby/pull/5516
2022-02-22Refactor out rb_decorate_message from print_errinfoYusuke Endoh
rb_decorate_message adds bold escape sequences to message, and the class name of exception (like " (RuntimeError)) of "message (RuntimeError)"). Notes: Merged: https://github.com/ruby/ruby/pull/5516
2022-02-22Do not escape error messageYusuke Endoh
[Feature #18367] Notes: Merged: https://github.com/ruby/ruby/pull/5516
2022-02-22error.c: RefactoringYusuke Endoh
Factor out from rb_error_write the responsibility to check if stderr is a tty. Notes: Merged: https://github.com/ruby/ruby/pull/5516
2022-02-21Removed dependency of net-protocol. There is no plan to remove from stdlibHiroshi SHIBATA
2022-02-21Removed dependency of io-wait. There is no plan to remove from stdlibHiroshi SHIBATA
2022-02-21rb_debug_rstring_null_ptr: add newlines in the message [ci skip]Nobuyoshi Nakada
The message should end with a newline, and break the long paragraph.
2022-02-21[DOC] Set the documentation title and main pageNobuyoshi Nakada
Copied from https://github.com/ruby/docs.ruby-lang.org/ to be as same as docs.ruby-lang.org.
2022-02-21* 2022-02-21 [ci skip]git
2022-02-21Fix links [ci skip]Kazuhiro NISHIYAMA
2022-02-20* 2022-02-20 [ci skip]git
2022-02-20[MSWin] Tentative measure for a bug of VS2022 [Misc #18362]Nobuyoshi Nakada
Disable the use of `__assume()`, when combinations of `isnan()`, `isinf()` and `__assume()` will be wrongly optimized due to the bug of VS2022. Notes: Merged: https://github.com/ruby/ruby/pull/5579
2022-02-20[MSWin] Try VS2022Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5579
2022-02-20[MSWin] Reduce duplicate configurationsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5579
2022-02-19Check if `__assume` is supportedNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5577
2022-02-19Define `HAVE___BUILTIN_UNREACHABLE` instead of `UNREACHABLE`Nobuyoshi Nakada
`UNREACHABLE` in ruby/internal/has/builtin.h is only used as just a flag now, and redefined in ruby/backward/2/assume.h then. Notes: Merged: https://github.com/ruby/ruby/pull/5577
2022-02-19Replace and Using METACLASS_OF macroS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/5576
2022-02-19Add String#byteindex, String#byterindex, and MatchData#byteoffset (#5518)Shugo Maeda
* Add String#byteindex, String#byterindex, and MatchData#byteoffset [Feature #13110] Co-authored-by: NARUSE, Yui <naruse@airemix.jp> Notes: Merged-By: shugo <shugo@ruby-lang.org>
2022-02-19Find pattern is no longer experimental [Feature #18585]Kazuki Tsujimoto
2022-02-19Fix location of NODE_LIT in p_kwKazuki Tsujimoto
2022-02-19Use symbols for clock IDs if `clockid_t` is not numericNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5574