Commit graph

84935 commits

Author SHA1 Message Date
Nobuyoshi Nakada
91c457e091
Parenthesized SVN IDs in .mailmap look too verbose [ci skip] 2024-04-12 18:22:04 +09:00
Nobuyoshi Nakada
69823b97b5
[Bug #20423] Fix error message of prism 2024-04-12 17:02:46 +09:00
Nobuyoshi Nakada
e36988450e
[Bug #20423] Disallow anonymous block within argument forwarding 2024-04-12 16:07:49 +09:00
Takashi Kokubun
971b552735 [PRISM] Suppress compiler warnings
../prism_compile.c: In function ‘pm_compile_node’:
../compile.c:583:24: warning: ‘retry_end_l’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  583 |     anchor->last->next = elem;
      |     ~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from ../compile.c:14256:
../prism_compile.c:5796:16: note: ‘retry_end_l’ was declared here
 5796 |         LABEL *retry_end_l;
      |                ^~~~~~~~~~~
../compile.c:255:42: warning: ‘retry_label’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  255 | #define LABEL_REF(label) ((label)->refcnt++)
      |                                          ^~
In file included from ../compile.c:14256:
../prism_compile.c:5795:16: note: ‘retry_label’ was declared here
 5795 |         LABEL *retry_label;
      |                ^~~~~~~~~~~
../prism_compile.c:5919:52: warning: ‘previous_block’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 5919 |             ISEQ_COMPILE_DATA(iseq)->current_block = previous_block;
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
2024-04-11 17:31:28 -07:00
Kevin Newton
842f151d79 [PRISM] Enable more passing tests 2024-04-11 15:47:30 -04:00
Cody Cutrer
c5e661b1d7 [rubygems/rubygems] Fix installing plugins via relative paths
This affected both CLI and Gemfile installs

a0d101a8df
2024-04-11 19:35:28 +00:00
Kevin Newton
cd516ebd20 [ruby/prism] Add Location#chop
5dd57f4b84
2024-04-11 18:53:30 +00:00
Kevin Newton
58f93eec18 [PRISM] Fix break in super block 2024-04-11 14:39:04 -04:00
Kevin Newton
bb5ed8b3df [PRISM] Fix flags on local variable operator write nodes 2024-04-11 12:18:51 -04:00
Peter Zhu
f2369de2a4 Remove redundant cast
ptr is already of the VALUE type, so we don't need to cast it.
2024-04-11 12:08:03 -04:00
Nobuyoshi Nakada
ca81f5a5de
Realclean extracted bundled gems and lock files 2024-04-11 23:47:32 +09:00
Nobuyoshi Nakada
2df4638538
Cleanings of .bundle do not need cleanings of ext 2024-04-11 23:47:32 +09:00
Alan Wu
c2622b5253
YJIT: x64: Remove register shuffle with opt_and and friends (#10498)
This is best understood by looking at the change to the output:

```diff
  # Insn: 0002 opt_and (stack_size: 2)
  - mov rax, rsi
  - and rax, rdi
  - mov rsi, rax
  + and rsi, rdi
```

It's a bit awkward to match against due to how stack operands are
lowered, but hey, it's nice to save the 2 unnecessary MOVs.
2024-04-11 10:37:56 -04:00
Jean Boussier
db0cf1aef9 prism_compile.c: use rb_enc_interned_str to reduce allocations
The `rb_fstring(rb_enc_str_new())` pattern is inefficient because:

- It passes a mutable string to `rb_fstring` so if it has to be interned it will first be duped.
- It an equivalent interned string already exists, we allocated the string for nothing.

With `rb_enc_interned_str` we either directly get the pre-existing string with 0 allocations,
or efficiently directly intern the one we create without first duping it.
2024-04-11 14:48:30 +02:00
Kevin Newton
56f9ac8d31 [ruby/prism] More unreachables
735f3122c2
2024-04-11 12:12:34 +00:00
Jean Boussier
9183101aa7 prism_compile.c: X_STRING should be frozen
The backtick method recieves a frozen string unless it is interpolated.

Otherwise the string held in the ISeq could be mutated by a custom
backtick method.
2024-04-11 08:08:30 -04:00
Naoto Ono
b2f8de3d9d Launchable: Correctly configure the missing "os" flavor in ubuntu.yaml 2024-04-11 20:25:08 +09:00
Nobuyoshi Nakada
e7f8db9079
[pty] Support ptsname_r of glibc
Although glibc `ptsname_r` man page mentions Tru64 and HP-UX, this
function appears to be declared obsolete on both.
2024-04-11 17:57:52 +09:00
Jean Boussier
1b830740ba compile.c: use rb_enc_interned_str to reduce allocations
The `rb_fstring(rb_enc_str_new())` pattern is inneficient because:

- It passes a mutable string to `rb_fstring` so if it has to be interned
  it will first be duped.
- It an equivalent interned string already exists, we allocated the string
  for nothing.

With `rb_enc_interned_str` we either directly get the pre-existing string
with 0 allocations, or efficiently directly intern the one we create
without first duping it.
2024-04-11 09:04:31 +02:00
Takashi Kokubun
ed303cd56c Fix a typo in a comment 2024-04-10 23:53:53 -07:00
yui-knk
501a32c630 Remove duplicated st_init_table_with_size definition
`st_init_table_with_size` is already defined in universal_parser.c.
2024-04-11 12:57:25 +09:00
Vivek Gupta
e9fd34750f
[DOC] Typo fix in NEWS.md
Fix https://github.com/ruby/ruby/pull/10366
2024-04-11 12:16:47 +09:00
Nobuyoshi Nakada
207788466e
[Bug #20417] Block local variables do not need to warn about unused 2024-04-11 12:03:55 +09:00
Koichi Sasada
5d9fd674c9 put empty rb_gc_force_recycle()
and declare it will be removed soon.

ddtrace is still referes the API and build was failed.
See https://github.com/DataDog/dd-trace-rb/pull/3578

Maybe threre are only few users of this C-API now so we can remove
it soon.
2024-04-11 12:00:33 +09:00
yui-knk
87ad5ca3ca Remove unused function from struct rb_parser_config_struct 2024-04-11 11:56:28 +09:00
S-H-GAMELINKS
76732b3e7b Remove unused AREF macro 2024-04-11 11:32:09 +09:00
yui-knk
39be11a17a Fix segv when parsing command by ripper
89cfc15207 made this event dispatch to pass `Qundef`
to user defined callback method by mistake.
This commit fix it to be `nil`.
2024-04-11 10:28:58 +09:00
Stan Lo
38e3819be6 [ruby/irb] Add a workaround to make IRB work with debug's tests
(https://github.com/ruby/irb/pull/919)

eb442c4dda
2024-04-10 23:16:32 +00:00
Peter Zhu
f389a211b5 Fix indentation in switch statement in gc.c 2024-04-10 16:32:49 -04:00
Kevin Newton
77d3996897 [ruby/prism] Put in an unreachable assert for rescues parsing
7a60b61368
2024-04-10 19:45:13 +00:00
Stan Lo
d75dc39880 [ruby/irb] Centralize rstrip calls
(https://github.com/ruby/irb/pull/918)

97898b6251
2024-04-10 17:33:44 +00:00
Nobuyoshi Nakada
d60b2caa95
Lock turbo_tests to 2.1.0 provisionally
turbo_tests 2.1.1 adds json to its dependency and the current bundler
does not take the standard library json and fails to build as a gem
before the installation.
2024-04-11 02:10:20 +09:00
tomoya ishida
6a505d1b59 [ruby/irb] Command implementation not by method
(https://github.com/ruby/irb/pull/824)

* Command is not a method

* Fix command test

* Implement non-method command name completion

* Add test for ExtendCommandBundle.def_extend_command

* Add helper method install test

* Remove spaces in command input parse

* Remove command arg unquote in help command

* Simplify Statement and handle execution in IRB::Irb

* Tweak require, const name

* Always install CommandBundle module to main object

* Remove considering local variable in command or expression check

* Remove unused method, tweak

* Remove outdated comment for help command arg

Co-authored-by: Stan Lo <stan001212@gmail.com>

---------

8fb776e379

Co-authored-by: Stan Lo <stan001212@gmail.com>
2024-04-10 16:52:53 +00:00
Kouhei Yanagita
9f6deaa688 [Misc #18984] Raise TypeError from Range#size if the range is not iterable 2024-04-10 07:28:07 -07:00
Taketo Takashima
f9f25d0ed0 [ruby/ipaddr] Added IPAddr#wildcard_mask
2093cebc1d
2024-04-10 10:30:53 +00:00
Nobuyoshi Nakada
13f04e5beb [ruby/io-console] Load the built extension library in noctty tests
74c78afc24
2024-04-10 09:10:50 +00:00
Kevin Newton
0107954f25 [ruby/prism] Fix up invalid global variable error message
8ce9ae487f
2024-04-09 16:29:01 +00:00
Kevin Newton
d101ec65e9 [ruby/prism] Reduce locals variables per CRuby
3e6830c3a5
2024-04-09 15:55:57 +00:00
Nobuyoshi Nakada
0bc71828b5 [pty] Split chfunc into functions in steps
- start a new session
- obtain the new controlling terminal
- drop privileges
- finally, `exec`
2024-04-09 22:50:09 +09:00
git
88355da673 Update default gems list at 6846b98576 [ci skip] 2024-04-09 13:48:19 +00:00
Mari Imaizumi
6846b98576 [ruby/reline] Bump version to 0.5.1
(https://github.com/ruby/reline/pull/672)

d348df90d2
2024-04-09 13:47:23 +00:00
yui-knk
4dbd9c7fec Remove unused function from struct rb_parser_config_struct 2024-04-09 09:58:05 +09:00
Nobuyoshi Nakada
3d73cd752f Hack to update spec/bundler/support/builders.rb 2024-04-09 09:52:28 +09:00
dependabot[bot]
c924322162 [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.90 to 0.9.91.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.90...v0.9.91)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

a84b94b9ec
2024-04-08 23:47:51 +00:00
dependabot[bot]
186374279e [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.90 to 0.9.91.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.90...v0.9.91)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

f0af491002
2024-04-08 23:47:42 +00:00
Kevin Newton
b09604e1fd [ruby/prism] Simplify locals test now that all fixtures are valid
0d32af5719
2024-04-08 16:54:25 +00:00
Alan Wu
478b4ef9de
Fix nil error with KNOWNBUGS.rb
Previously, `make test-knownbugs` crashed with `NoMethodError` due to
the failed regex match if there is a test case in KNOWNBUGS.rb.

The note about 1.8 compatibility is probably bogus as we require a way
more recent BASERUBY now.
2024-04-08 12:31:33 -04:00
Nobuyoshi Nakada
00cbdb5a8b
Skip even "Document" only 2024-04-08 21:26:11 +09:00
Étienne Barrié
49b31c7680 Document STR_CHILLED flag on RString
[Feature #20205]
2024-04-08 13:25:09 +02:00
Nobuyoshi Nakada
8217fbf4bd [ruby/tmpdir] Display the offending parent path in the exception
7751b12e97
2024-04-08 11:05:40 +00:00