1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

74299 commits

Author SHA1 Message Date
John Hawthorn
02f1554224
Implement object shapes for T_CLASS and T_MODULE ()
* Avoid RCLASS_IV_TBL in marshal.c
* Avoid RCLASS_IV_TBL for class names
* Avoid RCLASS_IV_TBL for autoload
* Avoid RCLASS_IV_TBL for class variables
* Avoid copying RCLASS_IV_TBL onto ICLASSes
* Use object shapes for Class and Module IVs
2022-10-31 14:05:37 -07:00
Takashi Kokubun
2b39640b0b
YJIT: Add RubyVM::YJIT.code_gc ()
* YJIT: Add RubyVM::YJIT.code_gc

* Rename compiled_page_count to live_page_count
2022-10-31 14:29:45 -04:00
Maxime Chevalier-Boisvert
5e6633fcf9
YJIT: reduce default --yjit-exec-mem-size to 128MiB instead of 256 ()
Reduce default --yjit-exec-mem-size to 128MiB instead of 256
2022-10-31 14:29:11 -04:00
S-H-GAMELINKS
c3de08cb24 Reuse FIBER_RESUMED_P macro 2022-10-31 19:57:46 +13:00
eileencodes
350d0aa023 [ruby/error_highlight] Support nodes in spot
Fixes a bug where `spot` was using the wrong local variable.

We want to use error highlight with code that has been eval'd,
specifically ERB templates. We can recover the compiled source code of
the ERB template but we need an API to pass the node into error
highlight's `spot`.

Required Ruby PR: https://github.com/ruby/ruby/pull/6593

https://github.com/ruby/error_highlight/commit/0b1b650a59

Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
2022-10-31 04:58:38 +00:00
eileencodes
3391c51eff Add node_id_for_backtrace_location function
We want to use error highlight with eval'd code, specifically ERB
templates. We're able to recover the generated code for eval'd templates
and can get a parse tree for the ERB generated code, but we don't have a
way to get the node id from the backtrace location. So we can't pass the
right node into error highlight.

This patch gives us an API to get the node id from the backtrace
location so we can find the node in the AST.

Error Highlight PR: https://github.com/ruby/error_highlight/pull/26

Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
2022-10-31 13:39:56 +09:00
Nobuyoshi Nakada
7ed10abdd9 [ruby/bigdecimal] Suppress macro redefinition warnings
`HAVE_` macros by autoconf are defined as 1.

https://github.com/ruby/bigdecimal/commit/cd35868aa6
2022-10-30 14:21:31 +00:00
Nobuyoshi Nakada
37593c7950
Ignore failure at moving revision.h [ci skip]
The source directory may be read-only.
2022-10-30 20:35:41 +09:00
Nobuyoshi Nakada
0717cb8419
Try -fstack-protector-strong on MinGW
The CI for MinGW has used it.
2022-10-30 19:16:09 +09:00
Nobuyoshi Nakada
2821423105
Run spec_guards only when spec files changed [ci skip] 2022-10-30 17:13:15 +09:00
Nobuyoshi Nakada
00d5b7ce7c vcs.rb: copy safe directory configuration
Now revision.tmp will be regenerated always and every times, even if
the recent file exists in the source directory, as far as using git.
On the other hand, VirtualBox mounts shared folders as root, and git
rejects the repository there as dubious ownership.
2022-10-30 17:06:33 +09:00
Nobuyoshi Nakada
b64514f132 vcs.rb: prettify debug print 2022-10-30 17:06:33 +09:00
git
1acbcf0e58 Update bundled gems list at 2022-10-30 2022-10-30 07:04:08 +00:00
Burdette Lamar
91c28ab2ee
[DOC] Enhanced RDOc for IO ()
In io.c treats:
    #close
    #close_read
    #close_write
    #closed
2022-10-29 14:47:16 -05:00
Kazuhiro NISHIYAMA
572cd10a86
Fix links and sort [ci skip] 2022-10-30 00:53:10 +09:00
Nobuyoshi Nakada
d5fb76a6c8 [ruby/optparse] Add tests for load(into:)
https://github.com/ruby/optparse/commit/51f7e060ee
2022-10-29 13:47:23 +00:00
Whyme Lyu
37291df91d [ruby/optparse] #load() into hash
(https://github.com/ruby/optparse/pull/42)

OptionParser#load learns .load(into: Hash)

https://github.com/ruby/optparse/commit/2ea626fcff

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2022-10-29 13:46:27 +00:00
Nobuyoshi Nakada
4dac53f0a4 [ruby/optparse] Add tests for OptionParser#load
https://github.com/ruby/optparse/commit/fb34a1d3a3
2022-10-29 13:40:19 +00:00
Nobuyoshi Nakada
bc28acc347 [ruby/digest] Use CommonDigest by default if available
https://github.com/ruby/digest/commit/cce9ada85e
2022-10-29 12:06:03 +00:00
Nobuyoshi Nakada
c5ca250eb5
Clear _FORTIFY_SOURCE before definition
As clang on macOS defines this macro as 0 internally when a sanitizer
option is given, clear it before definition to suppress redefinition
warnings.
2022-10-29 16:17:45 +09:00
Aaron Patterson
5e0432f59b
fix ASAN error in GC 2022-10-28 16:10:55 -07:00
Nobuyoshi Nakada
9b462aec4a
Follow up "Rework first_lineno to be int." 2022-10-28 19:33:19 +09:00
Nobuyoshi Nakada
1de8a42869
sync_default_gems.rb: do not add extra empty lines [ci skip] 2022-10-28 19:04:53 +09:00
Nobuyoshi Nakada
4021c6565f [ruby/irb] Do not make non-existent XDG directory on start
(https://github.com/ruby/irb/pull/357)


https://github.com/ruby/irb/commit/298b134792
2022-10-28 09:36:28 +00:00
Nobuyoshi Nakada
56c97a6621 [ruby/irb] Update regarding NO_COLOR value
https://no-color.org has been updated ():

> Command-line software which adds ANSI color to its output by default
should check for a `NO_COLOR` environment variable that, when present
and **not an empty string** (regardless of its value), prevents the
addition of ANSI color.

https://github.com/ruby/irb/commit/46e0f7e370

Co-authored-by: Stan Lo <stan001212@gmail.com>
2022-10-28 09:30:24 +00:00
Nobuyoshi Nakada
13e968c1cd [ruby/irb] Suppress sequence to inspect asian ambiguous width
https://github.com/ruby/irb/commit/a7097c5b80
2022-10-28 08:29:38 +00:00
Nobuyoshi Nakada
7440fc3eb4 [ruby/irb] Suppress "switching inspect mode" messages
https://github.com/ruby/irb/commit/565eeb3c19
2022-10-28 08:29:37 +00:00
Nobuyoshi Nakada
e6e202234c
sync_default_gems.rb: append orignal commit URLs to subject only log 2022-10-28 13:15:14 +09:00
Alan Wu
9cf027f83a
YJIT: Use guard_known_class() for opt_aref on Arrays ()
This code used to roll its own heap object check before we made a better
version in guard_known_class(). The improved version uses one fewer
comparison, so let's use that.
2022-10-27 18:52:58 -04:00
Maxime Chevalier-Boisvert
2812a57b14
Update docs wrt YJIT limitations and building YJIT ()
* Update docs wrt YJIT limitations and building YJIT

* Update building_ruby.md

Fix relative link
2022-10-27 16:50:00 -04:00
Peter Zhu
ea5972572b [ruby/irb] Fix warnings in test_cmd.rb
Fixes this warning:

    warning: assigned but unused variable - err

https://github.com/ruby/irb/commit/298fcb57a3
2022-10-27 15:29:52 -04:00
Stan Lo
b260c1e8c8 [ruby/irb] Remove unnecessary test setup 2022-10-27 15:29:11 -04:00
Benoit Daloze
bb7067cbdf [ruby/irb] Suppress warning for test which uses a locale non-existing on GitHub Actions 2022-10-27 19:16:52 +00:00
Benoit Daloze
8d7844235c [ruby/irb] Remove unecesary and harmful pend for TruffleRuby in TestRaiseNoBacktraceException
* Specifically the second one causes `$HOME` to be unset, which breaks `File.expand_path('~')`.

https://github.com/ruby/irb/commit/61963305f5
2022-10-27 19:16:51 +00:00
S.H
c6f439a6a8
Improve performance some Integer and Float methods [Feature ] ()
* Improve some Integer and Float methods

* Using alias and Remove unnecessary code

* Remove commentout code
2022-10-27 09:13:16 -07:00
Stan Lo
7cf7e6c332 [ruby/irb] Add missing require 2022-10-27 15:36:18 +00:00
st0012
26b913c88b [ruby/irb] Add test for IRB::InputCompletor::PerfectMatchedProc
This proc displays rdoc document when the input matches certain symbols
perfectly, like "String". It's commonly triggered with autocompletion
but only has 1 test case. So this commit increases its test coverage.

https://github.com/ruby/irb/commit/d85d719313
2022-10-27 15:25:39 +00:00
Shugo Maeda
5129ca3e05 [ruby/rdoc] Delay require "readline" in case the terminal is in raw mode 2022-10-27 08:16:06 +00:00
Nobuyoshi Nakada
739ad81ff1 [ruby/date] Check month range as civil 2022-10-27 05:36:11 +00:00
Nobuyoshi Nakada
cb80ee7a4a [ruby/tmpdir] Warnings should contain the environment variable name 2022-10-27 03:12:00 +00:00
Takashi Kokubun
792dc553f1
YJIT: Test --yjit-verify-ctx on GitHub Actions as well () 2022-10-26 18:20:33 -04:00
Takashi Kokubun
a8e2d73628
Fix the url of Cirrus failure notifications [ci skip]
The previous one was the url of this notification action, but we want to
see a link to Cirrus CI.

This code follows https://cirrus-ci.org/guide/notifications/.

Also, head_branch was null only for pull requests from a fork, so we can
use it for branch-based filtering, which is good.
2022-10-26 13:52:07 -07:00
Matthew Draper
c746f380f2
YJIT: Support nil and blockparamproxy as blockarg in send ()
Co-authored-by: John Hawthorn <john@hawthorn.email>

Co-authored-by: John Hawthorn <john@hawthorn.email>
2022-10-26 15:27:59 -04:00
Takashi Kokubun
fa0adbad92
YJIT: Invalidate i-cache for the other cb on next_page ()
* YJIT: Invalidate i-cache for the other cb on next_page

* YJIT: Invalidate only what's written by jmp_ptr

* YJIT: Move the code to the arm64 backend
2022-10-26 11:29:12 -04:00
Stan Lo
0dc2e1a764 [ruby/irb] Remove unnecessary warning check on help command
It's not an intentional behavior of the command and it behaves
differently in different environments. So checking it actually brings
more problem than benefit.

https://github.com/ruby/irb/commit/b3203bc784
2022-10-26 15:15:30 +00:00
Peter Zhu
73a0223f95 [ruby/irb] Rename test_helper.rb to helper.rb
The name test_helper.rb conflicts with the test_helper.rb in JSON,
causing build failures. This commit renames test_helper.rb to helper.rb.

https://github.com/ruby/irb/commit/b6a92bf6b3

Co-Authored-By: Stan Lo <stan001212@gmail.com>
2022-10-26 15:13:44 +00:00
st0012
cb95d834cc [ruby/irb] Don't insert new methods to Test::Unit::TestCase
Ruby CI runs irb and other Ruby core/stdlib tests in the same process.
So adding irb-specific helper to Test::Unit::TestCase could potentially
pollute other components' tests and should be avoided.
2022-10-26 10:44:29 -04:00
Stan Lo
2022470a95 [ruby/irb] Suppress warnings
Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2022-10-26 10:44:26 -04:00
st0012
d889e810f3 [ruby/irb] Add test for the help command 2022-10-26 10:44:23 -04:00
st0012
40f8a781a3 [ruby/irb] Extract without_rdoc helper 2022-10-26 10:44:03 -04:00