86825 Commits

Author SHA1 Message Date
Stan Lo
cbc40bb130 Sync rdoc 2024-08-05 08:27:45 +08:00
Ricardo Trindade
7d5cb4573d [ruby/irb] Remove Ruby version checks
(https://github.com/ruby/irb/pull/985)

https://github.com/ruby/irb/commit/9ce6972e71
2024-08-04 14:53:51 +00:00
Yusuke Endoh
b708661313 Extend timeout in test/ruby/test_file_exhaustive.rb 2024-08-03 16:30:32 +09:00
git
657f4b99f6 Update bundled gems list as of 2024-08-02 2024-08-03 07:01:34 +00:00
Yusuke Endoh
42cd267beb Reduce noise in object generation count tests
The parallel testing framework may create strings in a separate thread.

```
    1) Failure:
  TestStringMemory#test_byteslice_prefix [D:/a/ruby/ruby/src/test/ruby/test_string_memory.rb:40]:
  One object allocation is expected, but allocated: [["D:/a/ruby/ruby/src/tool/lib/test/unit/parallel.rb", 42, String, "2240\x00\x00\x00\x00...
```
https://github.com/ruby/ruby/actions/runs/10222885396/job/28288271190?pr=11271#step:23:1026
2024-08-03 14:39:17 +09:00
Alan Wu
e5fb851fe7 Delete unused declaration 2024-08-02 21:53:38 -04:00
Yusuke Endoh
23837c5170 Show where objects were allocated on allocation count tests 2024-08-03 05:25:28 +09:00
Kevin Menard
04a6165ac0
YJIT: Enhance the String#<< method substitution to handle integer codepoint values. (#11032)
* Document why we need to explicitly spill registers.

* Simplify passing a byte value to `str_buf_cat`.

* YJIT: Enhance the `String#<<` method substitution to handle integer codepoint values.

* YJIT: Move runtime type check into YJIT.

Performing the check in YJIT means we can make assumptions about the type. It also improves correctness of stack traces in cases where the codepoint argument is not a String or a Fixnum.
2024-08-02 15:45:22 -04:00
Yusuke Endoh
3f93ef06a8 Show what objects were actually allocated on allocation count tests
According to Launchable, these tests fail randomly

```
Failure:
TestStringMemory#test_byteslice_prefix [D:/a/ruby/ruby/src/test/ruby/test_string_memory.rb:33]:
<1> expected but was
<2>.
```

https://app.launchableinc.com/organizations/ruby/workspaces/ruby/data/test-paths/file%3Dtest%2Fruby%2Ftest_string_memory.rb%23%23%23class%3DTestStringMemory%23%23%23testcase%3Dtest_byteslice_prefix?testSessionStatus=flake
2024-08-02 23:29:28 +09:00
Hiroshi SHIBATA
303d2319f0
Auto-purge after package release 2024-08-02 12:07:48 +09:00
Hiroshi SHIBATA
0aaff21736
Notify ruby-build for definition update 2024-08-02 11:42:27 +09:00
yui-knk
66cbafc603 Refactor to use tokenize_ident instead of TOK_INTERN and set_yylval_name 2024-08-02 11:37:10 +09:00
Hiroshi SHIBATA
f070a9d8df
Notify update workflow for all-ruby
https://github.com/ruby/all-ruby/blob/master/.github/workflows/update.yml
2024-08-02 10:00:01 +09:00
Peter Zhu
f6e829603e Removed unused macro RVALUE_PAGE_MARKED 2024-08-01 15:54:08 -04:00
Naoto Ono
e0f4cbd612 Integrate Launchable into windows 2024-08-01 17:49:32 +09:00
Hiroshi SHIBATA
9ed7e06a27 Added workflow for building snapcraft
https://github.com/ruby/snap.ruby/actions/runs/10189575392/job/28187867439
2024-08-01 13:38:33 +08:00
Hiroshi SHIBATA
e935366fe8 Also update version index file 2024-08-01 13:38:33 +08:00
Hiroshi SHIBATA
a8f36c3263 Added workflow dispatch 2024-08-01 13:38:33 +08:00
Hiroshi SHIBATA
f2b7622330 We should run release.sh with release tag 2024-08-01 13:38:33 +08:00
Hiroshi SHIBATA
277a6e8f1a Added draft release action with tagging 2024-08-01 13:38:33 +08:00
Hiroshi SHIBATA
fc253d7ef9 Removed refs/tags from ruby version 2024-08-01 13:38:33 +08:00
Hiroshi SHIBATA
346bb6c08b Create docker image with release tag automatically 2024-08-01 13:38:33 +08:00
Aaron Patterson
bbeebc9258 Only set shape id for CCs on attr_set + ivar
Only ivar reader and writer methods should need the shape ID set on the
inline cache.  We shouldn't accidentally overwrite parts of the CC union
when it's not necessary.
2024-07-31 16:23:28 -07:00
tomoya ishida
16b0242808 [ruby/rdoc] Add new ruby parser that uses Prism
(https://github.com/ruby/rdoc/pull/1144)

* Add a new ruby parser RDoc::Parser::PrismRuby

* Add a new ruby parser testcase independent from parser's internal implementation

* unknown meta method

* Use MethodSignatureVisitor only to scan params, block_params and calls_super

* Add calls_super test

* Drop ruby 2.6. Prism requires ruby >= 2.7

* Remove duplicated documentation comment from prism_ruby.rb

* Add test for wrong argument passed to metaprogramming method

* Rename visit_call_[DSL_METHOD_NAME] to make it distinguishable from visit_[NODE_TYPE]_node

* Method receiver switch of true/false/nil to a case statement

* Extract common part of add_method(by def keyword) and add meta_comment method

* Reuse consecutive comments array when collecting comments

* Simplify DSL call_node handling

* Refactor extracting method visibility arguments

https://github.com/ruby/rdoc/commit/fde99f1be6
2024-07-31 20:50:00 +00:00
Peter Zhu
e68e958231 [PRISM] Increase test-bundler-parallel to 40 minutes
It's timing out frequently recently, so increasing the timeout should
fix it.
2024-07-31 16:37:21 -04:00
Burdette Lamar
f5d193d525
[DOC] Adds "Further Considerations" to documentation_guide.md (#11281) 2024-07-31 16:09:15 -04:00
Jeremy Evans
cc81437260 Rewrite Array.new documentation
Use plain paragraphs instead of a nested unordered list.

Remove some examples, including examples that produce warnings in
verbose mode or raise exceptions.

Explicitly document the common pitfall of using an expression as a
default value instead of using a block.
2024-07-31 13:04:42 -07:00
David Rodríguez
290089c1a2 [rubygems/rubygems] Remove some file_uri_for calls
https://github.com/rubygems/rubygems/commit/3570ba20ed
2024-07-31 20:03:18 +00:00
Peter Zhu
6358397490 Fix leak of AST when Ripper#compile_error jumps
For example, the following script leaks:

    class MyRipper < Ripper
      def initialize(src, &blk)
        super(src)
        @blk = blk
      end

      def compile_error(msg) = @blk.call(msg)
    end

    def call_parse = MyRipper.new("/") { |msg| return msg }.parse

    10.times do
      100_000.times do
        call_parse
      end

      puts `ps -o rss= -p #{$$}`
    end

Before:

    93952
    169040
    244224
    318784
    394432
    468224
    544048
    618560
    693776
    768384

After:

    19776
    19776
    20352
    20880
    20912
    21408
    21328
    21152
    21472
    20944
2024-07-31 14:47:44 -04:00
Takashi Kokubun
70b4f45d9f
YJIT: Decouple Context from encoding details (#11283) 2024-07-31 10:51:40 -04:00
Stan Lo
27c22f822a [ruby/rdoc] Drop unnecessary file_name parameter from Parser.for
method.
(https://github.com/ruby/rdoc/pull/1135)

* Unify top_level creation in tests

* Remove unnecessary file_name param from Parser.for

It should be always the same as the top_level's absolute_name, so there's
no point of taking it as a separate parameter.

https://github.com/ruby/rdoc/commit/97c497dfbb
2024-07-31 14:36:41 +00:00
Nobuyoshi Nakada
12a5400a88 [ruby/io-console] Remove no longer used variable
https://github.com/ruby/io-console/commit/651797ff8a
2024-07-31 13:20:01 +00:00
git
dedc496598 Update bundled gems list as of 2024-07-30 2024-07-31 07:00:28 +00:00
Nobuyoshi Nakada
92865d8760 Remove files to build libffi in mswin
These files were to build libffi from the bundled source, but are no
longer used since we stopped bundling the libffi sources in commit
e4f5296f065110fa83eb450d3a861253e76e534f.

The gemspec file is unchanged because fiddle gem itself still supports
ruby 2.5.
2024-07-31 11:19:52 +09:00
Satoshi Tagomori
19ec803179 Reset the counter for two consecutive runs 2024-07-31 10:59:51 +09:00
Nobuyoshi Nakada
7aea269b89 [Feature #20563] Drop support for Windows older than 8/Sever 2012
Directly call APIs available on Windows 8/Server 2012 and later.
2024-07-31 09:57:38 +09:00
Nobuyoshi Nakada
7ef8051cbb [Feature #20563] Drop support for Windows older than Vista/2008
Directly call APIs available on Windows Vista/Server 2008 and later.
2024-07-31 09:57:38 +09:00
Burdette Lamar
d2b8fd0f37
[DOC] Tweaks to Array.try_convert (#11260) 2024-07-30 16:31:33 -04:00
Burdette Lamar
91bb6afa75
[DOC] Tweaks for Array.new (#11259) 2024-07-30 10:09:06 -04:00
BurdetteLamar
b44a154959 [DOC] Tweaks for Array#& 2024-07-30 10:06:41 -04:00
David Rodríguez
0dda30d9eb [rubygems/rubygems] Print a better debug message when lockfile does not include the current platform
https://github.com/rubygems/rubygems/commit/afb7a6d754
2024-07-30 14:02:03 +00:00
David Rodríguez
997642cfbd [rubygems/rubygems] The simulate_platform helper can take a string
https://github.com/rubygems/rubygems/commit/680bafac1a
2024-07-30 14:02:02 +00:00
David Rodríguez
cf6efd1bb7 [rubygems/rubygems] Simplify logic to add current platform a bit
https://github.com/rubygems/rubygems/commit/e102516e27
2024-07-30 14:02:02 +00:00
David Rodríguez
1164b6a7ba [rubygems/rubygems] Fix gem list regression when a regular gem shadows a default one
Previously, if you have bundler installed both as a regular gem and a
default gem, the default gem would be displayed by `gem list`.

https://github.com/rubygems/rubygems/commit/10a6b1736e
2024-07-30 14:01:43 +00:00
David Rodríguez
3d248b2eb3 [rubygems/rubygems] Always leave default gem executables around
https://github.com/rubygems/rubygems/commit/775c35e197
2024-07-30 14:01:32 +00:00
David Rodríguez
ec13ccdf53 [rubygems/rubygems] Allow smoother breaking changes in test env
https://github.com/rubygems/rubygems/commit/0fc3feae19
2024-07-30 13:54:29 +00:00
Peter Zhu
b37ffb9345 Move incorrectly placed tests
The tests for Integer#ceil was accidentally placed in test_truncate.
2024-07-30 09:02:23 -04:00
Peter Zhu
a7167d0cee Fix ceil when ndigits is large
[Bug #20654]

This commit fixes Integer#ceil and Float#ceil when the number is
negative and ndigits is large such that 10**ndigits is a bignum.

Previously, it would return 0 in such cases. However, this would cause
unexpected behaviour such as:

    puts 1.ceil(-5) # => 100000
    puts 1.ceil(-10) # => 10000000000
    puts 1.ceil(-20) # => 0

This commit changes the last result so that it will return
100000000000000000000.
2024-07-30 08:21:28 -04:00
Peter Zhu
3af2a7fbe1 Fix floor when ndigits is large
[Bug #20654]

This commit fixes Integer#floor and Float#floor when the number is
negative and ndigits is large such that 10**ndigits is a bignum.

Previously, it would return 0 in such cases. However, this would cause
unexpected behaviour such as:

    puts -1.floor(-5) # => -100000
    puts -1.floor(-10) # => -10000000000
    puts -1.floor(-20) # => 0

This commit changes the last result so that it will return
-100000000000000000000.
2024-07-30 08:21:28 -04:00
tomoya ishida
1870505f47
Fix wrong unreachable chunk remove when jump destination label is unremovable 2024-07-30 15:31:58 +09:00