summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-02-25[DOC] Enhanced RDoc for some encoding methods (#5598)Burdette Lamar
In String, treats: #b #scrub #scrub! #unicode_normalize #unicode_normalize! #encode #encode! Also adds a note to IO.new (suggested by @jeremyevans). Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2022-02-26* 2022-02-26 [ci skip]git
2022-02-26Deprecate the unintentional ability to parse `Symbol`Nobuyoshi Nakada
2022-02-25[ruby/date] Use `assert_deprecated_warn`Nobuyoshi Nakada
https://github.com/ruby/date/commit/c55004715a
2022-02-25[ruby/date] Suppress declaration-after-statement warningsNobuyoshi Nakada
https://github.com/ruby/date/commit/60bd16009d
2022-02-25[ruby/date] Deprecate the unintentional ability to parse `Symbol`Nobuyoshi Nakada
https://github.com/ruby/date/commit/d57818f3b3
2022-02-25[ruby/date] Scale timeoutsNobuyoshi Nakada
https://github.com/ruby/date/commit/2889698e2f
2022-02-25[ruby/date] Update testsNobuyoshi Nakada
https://github.com/ruby/date/commit/5a138afce9
2022-02-25[ruby/date] Anchor at beginning of numbersNobuyoshi Nakada
https://hackerone.com/reports/1254844 https://github.com/ruby/date/commit/2f7814cc22
2022-02-25[ruby/date] Anchor at beginning of numbersNobuyoshi Nakada
https://hackerone.com/reports/1254844 https://github.com/ruby/date/commit/7ffe25e458
2022-02-25[ruby/date] Separate era from preceding wordNobuyoshi Nakada
https://github.com/ruby/date/commit/017149e53e
2022-02-25[ruby/date] Use possessive matchNobuyoshi Nakada
Reduce backtracks at the same character classes arounding an optional pattern. https://github.com/ruby/date/commit/1fd15f7c49
2022-02-25[ruby/date] Extracted common leading patternNobuyoshi Nakada
https://github.com/ruby/date/commit/ec86dbbdc1
2022-02-24[DOC] Enhancements for encoding.rdoc (#5578)Burdette Lamar
Adds sections: String Encoding Symbol and Regexp Encodings Filesystem Encoding Locale Encoding IO Encodings External Encoding Internal Encoding Script Encoding Transcoding Transcoding a String Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2022-02-24Fix yjit readme link pointing to old shopify readme (#5596)Adrien S
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
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