summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-08-20Execute MJIT in a forked Ruby process (#6264)Takashi Kokubun
[Misc #18968] Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2022-08-20Consider resolved-through-zsuper methods equal for compatibilityBenoit Daloze
* Fixes https://bugs.ruby-lang.org/issues/18751 Notes: Merged: https://github.com/ruby/ruby/pull/6242
2022-08-20Make Object#method and Module#instance_method not skip ZSUPER methodsJeremy Evans
Based on https://github.com/jeremyevans/ruby/commit/c95e7e5329140f640b6497905485761f3336d967 Among other things, this fixes calling visibility methods (public?, protected?, and private?) on them. It also fixes #owner to show the class the zsuper method entry is defined in, instead of the original class it references. For some backwards compatibility, adjust #parameters and #source_location, to show the parameters and source location of the method originally defined. Also have the parameters and source location still be shown by #inspect. Clarify documentation of {Method,UnboundMethod}#owner. Add tests based on the description of https://bugs.ruby-lang.org/issues/18435 and based on https://github.com/ruby/ruby/pull/5356#issuecomment-1005298809 Fixes [Bug #18435] [Bug #18729] Co-authored-by: Benoit Daloze <eregontp@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/6242
2022-08-20[Bug #18964] Add test for `rb_econv_append`Nobuyoshi Nakada
2022-08-19Rename mjit_exec to jit_exec (#6262)Takashi Kokubun
* Rename mjit_exec to jit_exec * Rename mjit_exec_slowpath to mjit_check_iseq * Remove mjit_exec references from comments Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2022-08-20Reuse rb_class_new_instance_kw functionS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/6241
2022-08-20Fix gdb incompatibilies in rp_class, rb_ps_vmnick evans
Other changes are needed to bring .gdbinit up-to-date with current ruby. It looks like lldb is the preferred approach now, and that config *is* being kept up-to-date. Still, this might be helpful to someone? Notes: Merged: https://github.com/ruby/ruby/pull/6246
2022-08-19Support Encoding::Converter newline: :lf and :lf_newline optionsJeremy Evans
Previously, newline: :lf was accepted but ignored. Where it should have been used was commented out code that didn't work, but unlike all other invalid values, using newline: :lf did not raise an error. This adds support for newline: :lf and :lf_newline, for consistency with newline: :cr and :cr_newline. This is basically the same as universal_newline, except that it only affects writing and not reading due to RUBY_ECONV_NEWLINE_DECORATOR_WRITE_MASK. Add tests for the File.open :newline option while here. Fixes [Bug #12436] Notes: Merged: https://github.com/ruby/ruby/pull/4590
2022-08-20[Bug #18958] format string must be ASCII compatibleNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6260
2022-08-20Check if encoding capable object before check if ASCII compatibleNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6260
2022-08-20[Bug #18956] Negative codepoints are invalid charactersNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6259
2022-08-19Ignore fc4acf8cae on git blameTakashi Kokubun
2022-08-19Make benchmark indentation consistentTakashi Kokubun
Related to https://github.com/Shopify/yjit-bench/pull/109
2022-08-20* 2022-08-20 [ci skip]git
2022-08-20[Bug #18955] format single character for `%c`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6258
2022-08-20[Bug #18955] Check length of argument for `%c` in proper encodingNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6258
2022-08-19Write interface instead of interfactKaíque Kandy Koga
Notes: Merged: https://github.com/ruby/ruby/pull/6254
2022-08-19[ruby/error_highlight] Apply ErrorHighlight::CoreExt to TypeError and ↵Yusuke Endoh
ArgumentError https://github.com/ruby/error_highlight/commit/defcaf1beb
2022-08-19syntax_suggest moved to under the ruby organization.Hiroshi SHIBATA
2022-08-19[DOC] Fix "military timezone"Nobuyoshi Nakada
Not only `J` is called military timezone.
2022-08-19Update default gems list at 490af8dbdb66263f29d0b4e43752fb [ci skip]git
2022-08-19Sync SyntaxSuggestschneems
``` $ tool/sync_default_gems.rb syntax_suggest ``` Notes: Merged: https://github.com/ruby/ruby/pull/5859
2022-08-19Setup SyntaxSuggest as default gemschneems
Adds the `syntax_suggest` syntax error display tool to Ruby through the same mechanism as `error_highlight` and `did_you_mean`. Reference ticket: https://bugs.ruby-lang.org/issues/18159 close #4845 ## What is syntax_suggest? When a syntax error is raised by requiring a file, dead_end will use a combination of indentation and lexing to identify the problem. > Note: Previously this tool was named `dead_end`. ## Known issues - SyntaxSearch's approach of showing syntax errors only works through integration with `require`, `load`, `autoload`, and `require_relative` (since it monkeypatches them to detect syntax errors). It does not work with direct Ruby file invocations https://github.com/zombocom/dead_end/issues/31. - This causes failure in the test suite (test_expected_backtrace_location_when_inheriting_from_basic_object_and_including_kernel) and confusion when inspecting backtraces if there's a different error when trying to require a file such as measuring memory (https://github.com/zombocom/syntax_suggest/issues/124#issuecomment-1006705016). - Discussed fix. We previously talked about opening up `SyntaxError` to be monkeypatched in the same way that other gems hook into `NoMethodError`. This is currently not possible and requires development work. When we last talked about it at RubyKaigi Nobu expressed an ability to make such a change. Notes: Merged: https://github.com/ruby/ruby/pull/5859
2022-08-19Reuse opt_nl ruleS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/5977
2022-08-19Repalce to NIL_P macroS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/6073
2022-08-19Fixed by [Bug #18964]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6253
2022-08-19Scan the code range of the last added portionNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6253
2022-08-19Scan the code range of the formatted portionNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6253
2022-08-19* remove trailing spaces. [ci skip]git
2022-08-18[ci skip][Feature #18910][lldb] Dedup lldb_initMatt Valentine-House
by moving it fully into RbBaseCommand Notes: Merged: https://github.com/ruby/ruby/pull/6129
2022-08-18[ci-skip][Feature #18910][lldb] New directory structureMatt Valentine-House
Push the newly refactored lldb files into a sub-directory so that we're not cluttering up the misc directory Notes: Merged: https://github.com/ruby/ruby/pull/6129
2022-08-18[ci-skip][Feature #18910][lldb] Port rclass_ext to new LLDB FrameworkMatt Valentine-House
Notes: Merged: https://github.com/ruby/ruby/pull/6129
2022-08-18[ci-skip][Feature #18910][lldb] Port heap_page command to new LLDB frameworkMatt Valentine-House
Notes: Merged: https://github.com/ruby/ruby/pull/6129
2022-08-18[ci-skip][Feature #18910][lldb] Provide class framework for lldb commandsMatt Valentine-House
`lldb_cruby.py` manages lldb custom commands using functions. The file is a large list of Python functions, and an init handler to map some of the Python functions into the debugger, to enable execution of custom logic during a debugging session. Since LLDB 3.7 (September 2015) there has also been support for using python classes rather than bare functions, as long as those classes implement a specific interface. This PR Introduces some more defined structure to the LLDB helper functions by switching from the function based implementation to the class based one, and providing an auto-loading mechanism by which new functions can be loaded. The intention behind this change is to make working with the LLDB helpers easier, by reducing code duplication, providing a consistent structure and a clearer API for developers. The current function based approach has some advantages and disadvantages Advantages: - Adding new code is easy. - All the code is self contained and searchable. Disadvantages: - No visible organisation of the file contents. This means - Hard to tell which functions are utility functions and which are available to you in a debugging session - Lots of code duplication within lldb functions - Large files quickly become intimidating to work with - for example, `lldb_disasm.py` was implemented as a seperate Python module because it was easier to start with a clean slate than add significant amounts of code to `lldb_cruby.py` This PR attempts, to fix the disadvantages of the current approach and maintain, or enhance, the benefits. The new structure of a command looks like this; ``` class TestCommand(RbBaseCommand): # program is the keyword the user will type in lldb to execute this command program = "test" # help_string will be displayed in lldb when the user uses the help functions help_string = "This is a test command to show how to implement lldb commands" # call is where our command logic will be implemented def call(self, debugger, command, exe_ctx, result): pass ``` If the command fulfils the following criteria it will then be auto-loaded when an lldb session is started: - The package file must exist inside the `commands` directory and the filename must end in `_command.py` - The package must implement a class whose name ends in `Command` - The class inherits from `RbBaseCommand` or at minimum a class that shares the same interface as `RbBaseCommand` (at minimum this means defining `__init__` and `__call__`, and using `__call__` to call `call` which is defined in the subclasses). - The class must have a class variable `package` that is a String. This is the name of the command you'll call in the `lldb` debugger. Notes: Merged: https://github.com/ruby/ruby/pull/6129
2022-08-19Allow strings in assert_pattern_listNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6252
2022-08-19* 2022-08-19 [ci skip]git
2022-08-19Harden SizedQueue#push timeout testNobuyoshi Nakada
2022-08-18Add tests for assert_pattern_listNobuyoshi Nakada
2022-08-18[DOC] `offset` argument of Regexp#matchNobuyoshi Nakada
2022-08-18rb_str_resize: Only clear coderange on truncationJean Boussier
If we are expanding the string or only stripping extra capacity then coderange won't change, so clearing it is wasteful. Notes: Merged: https://github.com/ruby/ruby/pull/6178
2022-08-18Implement SizedQueue#push(timeout: sec)Jean Boussier
[Feature #18944] If both `non_block=true` and `timeout:` are supplied, ArgumentError is raised. Notes: Merged: https://github.com/ruby/ruby/pull/6207
2022-08-18Update bundled gems list at 2022-08-18git
2022-08-18[Bug #18964] Update the code range of appended portionNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6250
2022-08-18ext/pty/extconf.rb: Try libutil only on OpenBSDYusuke Endoh
icc now seems to provide libutil.so that is not related to pty. This extconf.rb wrongly finds it and adds `-lutil`, but `ruby -rpty` fails because it cannot find libutil.so on the runtime. http://rubyci.s3.amazonaws.com/icc-x64/ruby-master/log/20220815T210005Z.fail.html.gz ``` Exception raised: <#<LoadError: libutil.so: cannot open shared object file: No such file or directory - /home/chkbuild/chkbuild/tmp/build/20220815T210005Z/ruby/.ext/x86_64-linux/pty.so>> ``` This change makes extconf.rb check libutil only on OpenBSD. Notes: Merged: https://github.com/ruby/ruby/pull/6249
2022-08-18Suppress detached head warnings [ci skip]Nobuyoshi Nakada
Check out the revisions for testing as "detached" from the beginning.
2022-08-18* 2022-08-18 [ci skip]git
2022-08-17Added vm setivar benchmark from yjit-benchJemma Issroff
Notes: Merged: https://github.com/ruby/ruby/pull/6247
2022-08-17Fix flaky test for GC thrashingPeter Zhu
GC could be in an intermediate state after creating the objects, so we should finish GC by running a minor GC. Notes: Merged: https://github.com/ruby/ruby/pull/6245
2022-08-17Extract common code from `rb_enc_vsprintf` and `rb_str_vcatf`Nobuyoshi Nakada
2022-08-17Update dependenciesNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6239