71479 Commits

Author SHA1 Message Date
Nobuyoshi Nakada
2cb3efffcf
Extract RUBY_REQUIRE_FUNCS 2022-03-28 16:56:15 +09:00
Nobuyoshi Nakada
282baa6943
[DOC] Move the entry for [Feature #18571] 2022-03-28 15:03:41 +09:00
Kazuhiro NISHIYAMA
4e580bd67a
Fix a link [ci skip] 2022-03-28 10:59:35 +09:00
Hiroshi SHIBATA
c3555e3da4
Added entry of Psych changes for #18571 2022-03-28 10:43:10 +09:00
git
63f6dce09e * 2022-03-28 [ci skip] 2022-03-28 04:45:31 +09:00
Burdette Lamar
d52cf1013f
[DOC] Enhanced RDoc for String (#5724)
Treats:

    #scan
    #hex
    #oct
    #crypt
    #ord
    #sum
2022-03-27 14:45:14 -05:00
Yusuke Endoh
ca85f16a7d ext/psych/extconf.rb: Fail when libyaml is unavailable
WHen libyaml is not installed, make fails with the following cryptic
message:

```
gmake[2]: Entering directory '/home/chkbuild/chkbuild-crossruby/tmp/build/20220325T045825Z/ruby/ext/psych'
gmake[2]: *** No rule to make target 'yaml/yaml.h', needed by 'psych.o'.  Stop.
gmake[2]: Leaving directory '/home/chkbuild/chkbuild-crossruby/tmp/build/20220325T045825Z/ruby/ext/psych'
```

I think it should give up building psych with a clear message.
2022-03-27 19:34:07 +09:00
Nobuyoshi Nakada
1b0f05168d
[DOC] Fix references to unary operator 2022-03-27 11:24:06 +09:00
git
956e57f7f3 * 2022-03-27 [ci skip] 2022-03-27 02:43:02 +09:00
Burdette Lamar
e699e2d9bf
Enhanced RDoc for String (#5723)
Treats:

    #lstrip
    #lstrip!
    #rstrip
    #rstrip!
    #strip
    #strip!

Adds section Whitespace in Strings.
2022-03-26 12:42:44 -05:00
Nobuyoshi Nakada
300f4677c9
[DOC] Use simple references to operator methods
Method references is not only able to be marked up as code, also
reflects `--show-hash` option.
The bug that prevented the old rdoc from correctly parsing these
methods was fixed last month.
2022-03-26 21:13:16 +09:00
Hiroshi SHIBATA
4acc757d04 [ruby/psych] Added condition for macOS homebrew
https://github.com/ruby/psych/commit/a876de5a82

Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
2022-03-26 07:49:52 +09:00
Jeremy Evans
f79765abe8 Update NEWS for {Kernel,TracePoint}#binding change 2022-03-25 14:33:24 -07:00
Burdette Lamar
7f93b7dc88
[DOC] Fix formatting for What's Here in IO (#5719)
* Fix formatting for What's Here in IO

* Repair formatting in What's Heres in numeric.c

* Fix formatting for What's Here in IO
2022-03-25 15:43:46 -05:00
Burdette Lamar
1a002d9ade
Fix formatting errors in What's Here for Array, Hash, ENV (#5718) 2022-03-25 13:48:21 -05:00
Burdette Lamar
d0b7df8153
Fix formatting of What's Here for File (#5717) 2022-03-25 12:16:37 -05:00
git
52793c007b * 2022-03-26 [ci skip] 2022-03-26 00:52:21 +09:00
Burdette Lamar
f918f6e4e7
[DOC] Repair format and links in What's Here sections (#5711)
* Repair format and links in What's Here for Comparable and Array

* Repair format for What's Here in enum.c
2022-03-25 10:52:06 -05:00
Nobuyoshi Nakada
69967ee64e
Revert "Finer-grained inline constant cache invalidation"
This reverts commits for [Feature #18589]:
* 8008fb7352abc6fba433b99bf20763cf0d4adb38
  "Update formatting per feedback"
* 8f6eaca2e19828e92ecdb28b0fe693d606a03f96
  "Delete ID from constant cache table if it becomes empty on ISEQ free"
* 629908586b4bead1103267652f8b96b1083573a8
  "Finer-grained inline constant cache invalidation"

MSWin builds on AppVeyor have been crashing since the merger.
2022-03-25 20:29:09 +09:00
Hiroshi SHIBATA
7ee26740e4 [ruby/readline-ext] Removed the duplicated dependencies
https://github.com/ruby/readline-ext/commit/324d324427
2022-03-25 20:27:58 +09:00
Hiroshi SHIBATA
033d979640 Disabled cross compile for unknown errors with psych build 2022-03-25 09:53:07 +09:00
Hiroshi SHIBATA
0292a34c9c Removed libyaml object files from depends 2022-03-25 09:53:07 +09:00
Hiroshi SHIBATA
bfdceab313 Try to remove yaml sources from depend 2022-03-25 09:53:07 +09:00
Hiroshi SHIBATA
829754b329 Added libyaml-dev into BASERUBY check 2022-03-25 09:53:07 +09:00
Hiroshi SHIBATA
8e3fbf9432 Merge psych master: Removed the bundled libyaml 2022-03-25 09:53:07 +09:00
Burdette Lamar
465edb96f0
[DOC] Enhanced RDoc for String (#5707)
Treated:

    #chomp
    #chomp!
    #chop
    #chop!
2022-03-24 19:40:58 -05:00
Jeremy Evans
343ea9967e Raise RuntimeError if Kernel#binding is called from a non-Ruby frame
Check whether the current or previous frame is a Ruby frame in
call_trace_func before attempting to create a binding for the frame.

Fixes [Bug #18487]

Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
2022-03-24 12:31:07 -07:00
git
33b13bd9f1 * 2022-03-25 [ci skip] 2022-03-25 01:14:55 +09:00
Kevin Newton
8008fb7352 Update formatting per feedback
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2022-03-24 09:14:38 -07:00
Kevin Newton
8f6eaca2e1 Delete ID from constant cache table if it becomes empty on ISEQ free
Co-authored-by: John Hawthorn <john@hawthorn.email>
2022-03-24 09:14:38 -07:00
Kevin Newton
629908586b Finer-grained inline constant cache invalidation
Current behavior - caches depend on a global counter. All constant mutations cause caches to be invalidated.

```ruby
class A
  B = 1
end

def foo
  A::B # inline cache depends on global counter
end

foo # populate inline cache
foo # hit inline cache

C = 1 # global counter increments, all caches are invalidated

foo # misses inline cache due to `C = 1`
```

Proposed behavior - caches depend on name components. Only constant mutations with corresponding names will invalidate the cache.

```ruby
class A
  B = 1
end

def foo
  A::B # inline cache depends constants named "A" and "B"
end

foo # populate inline cache
foo # hit inline cache

C = 1 # caches that depend on the name "C" are invalidated

foo # hits inline cache because IC only depends on "A" and "B"
```

Examples of breaking the new cache:

```ruby
module C
  # Breaks `foo` cache because "A" constant is set and the cache in foo depends
  # on "A" and "B"
  class A; end
end

B = 1
```

We expect the new cache scheme to be invalidated less often because names aren't frequently reused. With the cache being invalidated less, we can rely on its stability more to keep our constant references fast and reduce the need to throw away generated code in YJIT.
2022-03-24 09:14:38 -07:00
Peter Zhu
5f10bd634f Add ISEQ_BODY macro
Use ISEQ_BODY macro to get the rb_iseq_constant_body of the ISeq. Using
this macro will make it easier for us to change the allocation strategy
of rb_iseq_constant_body when using Variable Width Allocation.
2022-03-24 10:03:51 -04:00
git
04591e1be7 Update default gems list at 4c4a1e2035e08a627e71efd41d6654 [ci skip] 2022-03-24 12:39:01 +00:00
Marc-André Lafortune
4c4a1e2035 [ruby/ostruct] v0.5.4
https://github.com/ruby/ostruct/commit/fe19de4644
2022-03-24 21:38:26 +09:00
Marc-André Lafortune
ad5754162b [ruby/ostruct] Avoid aliasing block_given? for JRuby [Fixes #40]
https://github.com/ruby/ostruct/commit/14d04ff694
2022-03-24 21:37:14 +09:00
dependabot[bot]
137e69b481 Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-24 20:39:14 +09:00
dependabot[bot]
9deacb3155 Bump actions/cache from 2 to 3
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-24 20:38:15 +09:00
Hiroshi SHIBATA
2ec82dd361
Added dependabot configuration for actions dependencies 2022-03-24 20:31:57 +09:00
David Rodríguez
39606a774e [rubygems/rubygems] Maybe this is now fixed
https://github.com/rubygems/rubygems/commit/d9c442e54c
2022-03-24 20:22:00 +09:00
Nobuyoshi Nakada
e6c1db1d8a
[DOC] Refine flip-flop 2022-03-24 19:08:43 +09:00
Yusuke Endoh
8dc357fa94 Add Yuta Saito (katei) as the platform maintainer of WebAssembly/WASI 2022-03-24 13:23:24 +09:00
Nobuyoshi Nakada
1bb9e42fa5 extlibs.rb: Add fallback Colorize
To get rid of an unnecessary dependency for the case using
in other repositories.
2022-03-24 13:16:13 +09:00
Nobuyoshi Nakada
9ed6875f93 extlibs.rb: Enclose Vars in ExtLibs class
To get rid of an unnecessary top-level constant for the case using
as a library.
2022-03-24 13:16:13 +09:00
Nobuyoshi Nakada
247f8ecfa4 extlibs.rb: Extract ExtLibs#process
For the case using this script as a library.
- `ExtLibs#process` reads and processes an extlibs file.
- `ExtLibs#process_under` processes all extlibs files under the
  given directory.
- `Extlibs.run` parses `ARGV` and lets an instance process the
  directories.
2022-03-24 13:16:13 +09:00
Yusuke Endoh
9112cf4ae7 regint.h: Reduce the frequency of rb_thread_check_ints
edc8576a65b7082597d45a694434261ec3ac0d9e checks interrupt at every
backtrack, which brought significant overhead.

This change makes the check only once every 128 backtracks.
2022-03-24 09:47:22 +09:00
Nobuyoshi Nakada
1357b14750
Now all extension libraries must consider the ABI header 2022-03-24 08:59:24 +09:00
Nobuyoshi Nakada
cccfd65350
[DOC] Remove mis-synced bundler directory 2022-03-24 08:34:57 +09:00
David Rodríguez
d9dd88a686 [rubygems/rubygems] Avoid crash in test teardown
If an exception happens during test `setup` method, the `teardown`
method will still be run for cleaning up, but if some other errors
occurs then, it will hide the original error.

This is happening sometimes in CI where restoring original gem hooks is
failing because the error in `setup` happened before the variable
holding the original hooks was initialized.

This commit moves initialization of `@orig_hooks` to the beginning of
the `setup` method to avoid this issue.

https://github.com/rubygems/rubygems/commit/8524d2b74d
2022-03-24 07:34:29 +09:00
git
8b05b5a0e1 * 2022-03-24 [ci skip] 2022-03-24 05:32:22 +09:00
David Rodríguez
13481c1ec9 [rubygems/rubygems] Improve RDoc setup
Completely exclude the full bundler folder. The actual Bundler docs are
excluded anyways by ruby-core (by bundler/lib/bundler/.document,
bundler/lib/bundler/man/.document), I guess because bundler docs are not
in RDoc format?

Running RDoc in the repo root before these changes takes about 5 minutes
on my machine, while after these changes takes about 15 seconds.

https://github.com/rubygems/rubygems/commit/8b1802447a
2022-03-24 05:32:06 +09:00