Commit graph

83871 commits

Author SHA1 Message Date
Nobuyoshi Nakada
c0c56d1714 [ruby/tmpdir] Use IO.popen to list files
- Redirect `git ls-files` without shelling out.

- When building by `gem`, `__FILE__` is the path name given in the
  command line, or the gemspec file name in the current directory.  In
  that case, comparison it and expanded path never equal.  Compare
  listed file names with the base name of `__FILE__` instead.

f505e3f7cb
2024-02-25 08:32:09 +00:00
git
6108962030 Update default gems list at 2c1b7bc51c [ci skip] 2024-02-25 08:07:53 +00:00
Stan Lo
2c1b7bc51c [ruby/reline] Bump version to v0.4.3
(https://github.com/ruby/reline/pull/642)

5137a3f3af
2024-02-25 08:07:07 +00:00
Stan Lo
2721a64e41 [ruby/reline] Use gray and white as the default dialog theme
(https://github.com/ruby/reline/pull/637)

I think this has a few benefits:

1. Most terminal themes generally don't change or pick similar colors
   for their black and white colors, so it's more likely to be consistent
    across terminals/themes.
2. They don't have the potential color-blind issues that other color options
   may have.
3. We won't need additional changes for no color mode.

6579a0a737
2024-02-25 07:08:34 +00:00
Nobuyoshi Nakada
7356067b73 [ruby/tmpdir] Update gemspec according to the recent bundler template
4ef7bc4f2a
2024-02-25 05:04:12 +00:00
Nobuyoshi Nakada
012a0b9125 [ruby/resolv] Simplify adding new entries
081b8df705
2024-02-25 04:39:22 +00:00
Nobuyoshi Nakada
30b99868f9 [ruby/resolv] Treat hostname as same as aliases
fa812d6454
2024-02-25 04:39:22 +00:00
Naoto Ono
2c0cf6837c Launchable: Fix the warning of pip 2024-02-25 12:50:42 +09:00
Takashi Kokubun
e9e752c7ef Assert running_iseq before using it
When running_iseq happens to be 0, it's better to fail on the assertion
rather than referencing the null pointer.
2024-02-23 20:19:37 -08:00
Kevin Newton
804b2a3787 [ruby/prism] Rebase against main
813e20d449
2024-02-24 03:39:29 +00:00
Gopal Patel
aa8841405b [ruby/prism] Less code modifications. More steep:ignore for now
7905bdbf83
2024-02-24 03:39:28 +00:00
Gopal Patel
dfee033746 [ruby/prism] Replace awkward code changes with steep:ignore
Also remove RBS for currently ignored files. Will follow-up when those
check fully in later PRs.

2cae58f86d
2024-02-24 03:39:28 +00:00
Gopal Patel
66565e36ea [ruby/prism] Add documentation for Location#source!
467e1cc2c4
2024-02-24 03:39:26 +00:00
Gopal Patel
8fa1843523 [ruby/prism] Relax Location#source to be optional
9f00fe7510
2024-02-24 03:39:26 +00:00
Gopal Patel
bfbaafbd9c [ruby/prism] Make rake check_annotations verify public RBS
db78eef6a2
2024-02-24 03:39:26 +00:00
Gopal Patel
ca8a626586 [ruby/prism] Fix my RipperCompat logic mistake from expansion for steep flow analysis
f71a390c12
2024-02-24 03:39:25 +00:00
Gopal Patel
935d4fab62 [ruby/prism] Remove Ripper from public RBS, type-assert remaining issues
5fda7a0760
2024-02-24 03:39:23 +00:00
Gopal Patel
7556fd937c [ruby/prism] Split private types
0209d093ec
2024-02-24 03:39:22 +00:00
Gopal Patel
e03e9c3644 [ruby/prism] wip: node unions
99a71675d4
2024-02-24 03:39:20 +00:00
Gopal Patel
46fe3dc799 [ruby/prism] Fix IgnoredNewlineToken comparison of Ripper::Lexer::State
8c9502f61b
2024-02-24 03:39:20 +00:00
Gopal Patel
b9b0712556 [ruby/prism] Use steep to type check RBS and Ruby files
eabed9f4fd
2024-02-24 03:39:19 +00:00
Kevin Newton
fc656acee9
[PRISM] Sync to latest prism 2024-02-23 21:56:56 -05:00
Takashi Kokubun
e439419baa [DOC] Fix a typo 2024-02-23 16:21:36 -08:00
Peter Zhu
a255b43ff1 Update common.mk 2024-02-23 17:17:12 -05:00
Kevin Newton
96907f9495 [ruby/prism] Convert pm_integer_t to strings
fa9a30ad91
2024-02-23 21:54:01 +00:00
Burdette Lamar
e458494194
[DOC] Doc for command line options (#10059) 2024-02-23 15:53:39 -05:00
Kevin Newton
ec6532b458 [ruby/prism] Add some encoding debugging to make testing easier
0c042561c6
2024-02-23 20:02:19 +00:00
Peter Zhu
ce8531fed4 Stop using rb_str_locktmp_ensure publicly
rb_str_locktmp_ensure is a private API.
2024-02-23 14:08:29 -05:00
Takashi Kokubun
8a6740c70e
YJIT: Lazily push a frame for specialized C funcs (#10080)
* YJIT: Lazily push a frame for specialized C funcs

Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>

* Fix a comment on pc_to_cfunc

* Rename rb_yjit_check_pc to rb_yjit_lazy_push_frame

* Rename it to jit_prepare_lazy_frame_call

* Fix a typo

* Optimize String#getbyte as well

* Optimize String#byteslice as well

---------

Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
2024-02-23 19:08:09 +00:00
eileencodes
50ace992c7 [Bug #20234] Fix segv when parsing begin statement in method definition
In a method definition, the `begin` may not have an `nd_body`. When that
happens we get a null expr back from `last_expr_node` which causes a
segv for the following examples:

```ruby
def (begin;end).foo; end
def (begin;else;end).foo; end
def (begin;ensure;else;end).foo; end
```

In addition, I've added tests for other cases that weren't causing a
segv but appeared untested.`

Fixes https://bugs.ruby-lang.org/issues/20234
2024-02-23 10:59:10 -08:00
Peter Zhu
510404f2de Stop using rb_fstring publicly
rb_fstring is a private API, so we should use rb_str_to_interned_str
instead, which is a public API.
2024-02-23 13:33:46 -05:00
Peter Zhu
01f9b2ae41 Use rb_str_to_interned_str in parse.y
This commit changes rb_fstring to rb_str_to_interned_str in parse.y.
rb_fstring is private so it shouldn't be used by ripper.
2024-02-23 13:33:46 -05:00
Kevin Newton
9a09e27a73 [PRISM] Use new static literal comparisons 2024-02-23 13:25:31 -05:00
Kevin Newton
02b531a813 [ruby/prism] Factor in sign to integer comparison
377666a5df
2024-02-23 13:25:31 -05:00
Kevin Newton
b9202788f8 [ruby/prism] Refactor pm_node_list_insert to use a binary search
a060b21e1d
2024-02-23 13:25:31 -05:00
Kevin Newton
a38cc177d2 [ruby/prism] Duplicated when clauses
865b0d5fbe
2024-02-23 13:25:31 -05:00
Kevin Newton
d1ce989829 [ruby/prism] Duplicated hash keys
3e10c46c14
2024-02-23 13:25:31 -05:00
Akira Matsuda
73dd3ce03e [ruby/ipaddr] Prefer String#start_with? over Regexp.match
054fe12ec4
2024-02-23 17:56:08 +00:00
Akira Matsuda
6ad52e336d [ruby/ipaddr] String#split seems to be faster than capturing digits with Regexp
e0feb0708b
2024-02-23 17:55:33 +00:00
Mike Shaver
32f8ed7afd Typo fix. 2024-02-23 12:54:31 -05:00
Marek Küthe
8b2c421a17 Add option for mtu discovery flag
Signed-off-by: Marek Küthe <m.k@mk16.de>
2024-02-23 09:47:09 -08:00
Marek Küthe
4bb4327228 Fixes [Bug #20258]
Signed-off-by: Marek Küthe <m.k@mk16.de>
2024-02-23 09:47:09 -08:00
Peter Zhu
df5b8ea4db Remove unneeded RUBY_FUNC_EXPORTED 2024-02-23 10:24:21 -05:00
Peter Zhu
386a006630 Use rb_hash_foreach in objspace.c
Using RHASH_TBL_RAW is a private API, so we should use rb_hash_foreach
rather than RHASH_TBL_RAW with st_foreach.
2024-02-23 10:24:21 -05:00
Peter Zhu
6bd3e8fbb2 Use rb_hash_foreach in coverage
Using RHASH_TBL_RAW is a private API, so we should use rb_hash_foreach
rather than RHASH_TBL_RAW with st_foreach.
2024-02-23 10:24:21 -05:00
tomoya ishida
ea2fb7460e [ruby/irb] Remove useless loaded file check
(https://github.com/ruby/irb/pull/885)

f6d489658e
2024-02-23 13:11:20 +00:00
Naoto Ono
3371936b6f Add Launchable into CI 2024-02-23 14:10:01 +01:00
Nobuyoshi Nakada
7da3f8dcd3 [ruby/optparse] [DOC] About return value of OptionParser#new
59b9fd7ddc
2024-02-23 12:50:08 +00:00
tomoya ishida
f0172fc7ee [ruby/irb] Remove workaround for empty lines in dynamic_prompt
(https://github.com/ruby/irb/pull/884)

820b9e8dd6
2024-02-23 12:32:59 +00:00
tomoya ishida
598b03648f [ruby/irb] Remove remaining frozen_string_literal: false in lib/
(https://github.com/ruby/irb/pull/883)

4bfdb23ae6
2024-02-23 12:32:50 +00:00