aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/date] Use possessive matchNobuyoshi Nakada2022-02-251-2/+2
| | | | | | | Reduce backtracks at the same character classes arounding an optional pattern. https://github.com/ruby/date/commit/1fd15f7c49
* [ruby/date] Extracted common leading patternNobuyoshi Nakada2022-02-251-10/+13
| | | | https://github.com/ruby/date/commit/ec86dbbdc1
* [DOC] Enhancements for encoding.rdoc (#5578)Burdette Lamar2022-02-241-1/+169
| | | | | | | | | | | | | | | Adds sections: String Encoding Symbol and Regexp Encodings Filesystem Encoding Locale Encoding IO Encodings External Encoding Internal Encoding Script Encoding Transcoding Transcoding a String
* Fix yjit readme link pointing to old shopify readme (#5596)Adrien S2022-02-241-1/+1
|
* [DOC] Fix typo in yjit docseileencodes2022-02-241-1/+1
| | | | | I noticed this yesterday when pairing with Aaron, there was an extra "e" in "callees".
* * 2022-02-25 [ci skip]git2022-02-251-1/+1
|
* Add ABI version to ruby_version tag on WindowsPeter Zhu2022-02-242-1/+2
|
* Add ABI version to RUBY_LIB_VERSIONPeter Zhu2022-02-242-11/+5
| | | | | | 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.
* Constant time class to class ancestor lookupJohn Hawthorn2022-02-235-5/+143
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Never call kind_of with klass=0John Hawthorn2022-02-232-8/+3
|
* * 2022-02-24 [ci skip]git2022-02-241-1/+1
|
* rb_provide_feature: Prevent $LOADED_FEATURES from being copiedJean Boussier2022-02-231-0/+4
| | | | | | | | | | | | | | | | [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>
* Use rb_ary_behead for rb_ary_shiftPeter Zhu2022-02-231-55/+28
| | | | | rb_ary_shift is just a special case of rb_ary_behead where we behead only 1 element.
* Update bundled gems list at 2022-02-23git2022-02-232-2/+2
|
* Rename the wrong variable name `beg` to `len`Shugo Maeda2022-02-231-3/+3
|
* Update ext/-test-/dln/empty/dependPeter Zhu2022-02-221-0/+159
| | | | | Dependencies was not updated in 06dab12717a05bf49e4c6dff1d6f5458678d0e00.
* Include ruby.h in empty.c to have ABI versionPeter Zhu2022-02-221-0/+2
| | | | | I forgot to include this as part of 638fd8774bed27b997f3b634ba8be7aa304be3c3.
* * 2022-02-23 [ci skip]git2022-02-231-1/+1
|
* Fix compiler warning for uninitialized variablePeter Zhu2022-02-221-1/+1
| | | | | | | Fixes this compiler warning: warning: 'loc' may be used uninitialized in this function [-Wmaybe-uninitialized] bt_yield_loc(loc - cfunc_counter, cfunc_counter, btobj);
* [Feature #18249] Update dependenciesPeter Zhu2022-02-2292-13/+4727
|
* [Feature #18249] Include ruby.h in extensions to have ABI versionPeter Zhu2022-02-224-0/+7
| | | | | All shared libraries must have `include/ruby/internal/abi.h` to include the ABI version. Including `ruby.h` will guarantee that.
* [Feature #18249] Implement ABI checkingPeter Zhu2022-02-228-0/+130
| | | | | | | | | | | | | | | | | | | | 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"]`.
* [ruby/reline] Fix support for emacs-ctlx and emacs-meta keymapsTim Pope2022-02-222-2/+36
| | | | | | | | | | | | 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
* [ruby/zlib] [DOC] Fix typo in Zlib.adler32_combineMau Magnaguagno2022-02-221-1/+1
| | | | https://github.com/ruby/zlib/commit/5e8f0b4164
* [ruby/rdoc] Prefer `require 'cgi/util'` instead of `require 'cgi'`Yusuke Endoh2022-02-225-5/+5
| | | | | | | 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
* [rubygems/rubygems] Resolve cleaned-up error with temporary gemhomeHiroshi SHIBATA2022-02-221-0/+2
| | | | https://github.com/rubygems/rubygems/commit/623162ad2b
* * 2022-02-22 [ci skip]git2022-02-221-1/+1
|
* Factor a "highlight" symbol outYusuke Endoh2022-02-221-7/+4
|
* Remove unneeded newline from detailed_messageYusuke Endoh2022-02-221-1/+0
|
* Add a test for Exception#detailed_messageYusuke Endoh2022-02-221-0/+29
|
* Let Exception#full_message pass highlight keywords to #detailed_messageYusuke Endoh2022-02-221-0/+7
| | | | .. even when the argument is not explicitly passed.
* test/ruby/test_rubyoptions.rb: Make it pass on WindowsYusuke Endoh2022-02-221-1/+1
|
* The default highlight arguments of Exception#detailed_message is falseYusuke Endoh2022-02-221-5/+10
|
* Exception#detailed_message is addedYusuke Endoh2022-02-222-17/+67
| | | | | | | | | | | 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]
* Refactor out rb_decorate_message from print_errinfoYusuke Endoh2022-02-221-20/+49
| | | | | rb_decorate_message adds bold escape sequences to message, and the class name of exception (like " (RuntimeError)) of "message (RuntimeError)").
* Do not escape error messageYusuke Endoh2022-02-223-53/+13
| | | | [Feature #18367]
* error.c: RefactoringYusuke Endoh2022-02-222-43/+68
| | | | | Factor out from rb_error_write the responsibility to check if stderr is a tty.
* Removed dependency of net-protocol. There is no plan to remove from stdlibHiroshi SHIBATA2022-02-211-1/+0
|
* Removed dependency of io-wait. There is no plan to remove from stdlibHiroshi SHIBATA2022-02-211-1/+0
|
* rb_debug_rstring_null_ptr: add newlines in the message [ci skip]Nobuyoshi Nakada2022-02-211-2/+2
| | | | | The message should end with a newline, and break the long paragraph.
* [DOC] Set the documentation title and main pageNobuyoshi Nakada2022-02-212-1/+5
| | | | | Copied from https://github.com/ruby/docs.ruby-lang.org/ to be as same as docs.ruby-lang.org.
* * 2022-02-21 [ci skip]git2022-02-211-1/+1
|
* Fix links [ci skip]Kazuhiro NISHIYAMA2022-02-211-0/+1
|
* * 2022-02-20 [ci skip]git2022-02-201-1/+1
|
* [MSWin] Tentative measure for a bug of VS2022 [Misc #18362]Nobuyoshi Nakada2022-02-202-0/+51
| | | | | | Disable the use of `__assume()`, when combinations of `isnan()`, `isinf()` and `__assume()` will be wrongly optimized due to the bug of VS2022.
* [MSWin] Try VS2022Nobuyoshi Nakada2022-02-201-1/+1
|
* [MSWin] Reduce duplicate configurationsNobuyoshi Nakada2022-02-201-11/+13
|
* Check if `__assume` is supportedNobuyoshi Nakada2022-02-194-6/+14
|
* Define `HAVE___BUILTIN_UNREACHABLE` instead of `UNREACHABLE`Nobuyoshi Nakada2022-02-194-8/+2
| | | | | `UNREACHABLE` in ruby/internal/has/builtin.h is only used as just a flag now, and redefined in ruby/backward/2/assume.h then.
* Replace and Using METACLASS_OF macroS-H-GAMELINKS2022-02-191-15/+15
|