rbs 3.9.5 → 3.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.clang-format +74 -0
- data/.clangd +2 -0
- data/.github/workflows/c-check.yml +56 -0
- data/.github/workflows/comments.yml +4 -2
- data/.github/workflows/ruby.yml +37 -19
- data/.github/workflows/typecheck.yml +1 -1
- data/.github/workflows/windows.yml +1 -1
- data/.gitignore +4 -0
- data/CHANGELOG.md +84 -0
- data/README.md +38 -1
- data/Rakefile +152 -23
- data/config.yml +190 -62
- data/core/array.rbs +96 -46
- data/core/comparable.rbs +13 -6
- data/core/complex.rbs +40 -25
- data/core/dir.rbs +4 -4
- data/core/encoding.rbs +6 -9
- data/core/enumerable.rbs +90 -3
- data/core/enumerator.rbs +43 -1
- data/core/errno.rbs +8 -0
- data/core/errors.rbs +28 -1
- data/core/exception.rbs +2 -2
- data/core/fiber.rbs +29 -20
- data/core/file.rbs +49 -19
- data/core/file_test.rbs +1 -1
- data/core/float.rbs +224 -33
- data/core/gc.rbs +417 -281
- data/core/hash.rbs +1023 -727
- data/core/integer.rbs +104 -63
- data/core/io/buffer.rbs +21 -10
- data/core/io/wait.rbs +11 -33
- data/core/io.rbs +14 -12
- data/core/kernel.rbs +61 -51
- data/core/marshal.rbs +1 -1
- data/core/match_data.rbs +1 -1
- data/core/math.rbs +42 -3
- data/core/method.rbs +63 -25
- data/core/module.rbs +101 -23
- data/core/nil_class.rbs +3 -3
- data/core/numeric.rbs +25 -17
- data/core/object.rbs +3 -3
- data/core/object_space.rbs +21 -15
- data/core/pathname.rbs +1272 -0
- data/core/proc.rbs +30 -24
- data/core/process.rbs +2 -2
- data/core/ractor.rbs +361 -509
- data/core/range.rbs +7 -8
- data/core/rational.rbs +56 -34
- data/core/rbs/unnamed/argf.rbs +2 -2
- data/core/rbs/unnamed/env_class.rbs +1 -1
- data/core/rbs/unnamed/random.rbs +4 -2
- data/core/regexp.rbs +25 -20
- data/core/ruby.rbs +53 -0
- data/core/ruby_vm.rbs +6 -4
- data/core/rubygems/errors.rbs +3 -70
- data/core/rubygems/rubygems.rbs +11 -79
- data/core/rubygems/version.rbs +2 -3
- data/core/set.rbs +488 -359
- data/core/signal.rbs +24 -14
- data/core/string.rbs +3157 -1239
- data/core/struct.rbs +1 -1
- data/core/symbol.rbs +17 -11
- data/core/thread.rbs +95 -33
- data/core/time.rbs +35 -9
- data/core/trace_point.rbs +7 -4
- data/core/unbound_method.rbs +14 -6
- data/docs/aliases.md +79 -0
- data/docs/collection.md +2 -2
- data/docs/encoding.md +56 -0
- data/docs/gem.md +0 -1
- data/docs/sigs.md +3 -3
- data/ext/rbs_extension/ast_translation.c +1016 -0
- data/ext/rbs_extension/ast_translation.h +37 -0
- data/ext/rbs_extension/class_constants.c +155 -0
- data/{include/rbs/constants.h → ext/rbs_extension/class_constants.h} +7 -1
- data/ext/rbs_extension/compat.h +10 -0
- data/ext/rbs_extension/extconf.rb +25 -1
- data/ext/rbs_extension/legacy_location.c +317 -0
- data/ext/rbs_extension/legacy_location.h +45 -0
- data/ext/rbs_extension/main.c +357 -14
- data/ext/rbs_extension/rbs_extension.h +6 -21
- data/ext/rbs_extension/rbs_string_bridging.c +9 -0
- data/ext/rbs_extension/rbs_string_bridging.h +24 -0
- data/include/rbs/ast.h +687 -0
- data/include/rbs/defines.h +86 -0
- data/include/rbs/lexer.h +199 -0
- data/include/rbs/location.h +59 -0
- data/include/rbs/parser.h +135 -0
- data/include/rbs/string.h +47 -0
- data/include/rbs/util/rbs_allocator.h +59 -0
- data/include/rbs/util/rbs_assert.h +20 -0
- data/include/rbs/util/rbs_buffer.h +83 -0
- data/include/rbs/util/rbs_constant_pool.h +6 -67
- data/include/rbs/util/rbs_encoding.h +282 -0
- data/include/rbs/util/rbs_unescape.h +24 -0
- data/include/rbs.h +1 -2
- data/lib/rbs/annotate/formatter.rb +3 -13
- data/lib/rbs/annotate/rdoc_annotator.rb +3 -1
- data/lib/rbs/annotate/rdoc_source.rb +1 -1
- data/lib/rbs/cli/validate.rb +2 -2
- data/lib/rbs/cli.rb +1 -1
- data/lib/rbs/collection/config/lockfile_generator.rb +8 -0
- data/lib/rbs/definition_builder/ancestor_builder.rb +5 -5
- data/lib/rbs/environment.rb +64 -59
- data/lib/rbs/environment_loader.rb +0 -6
- data/lib/rbs/errors.rb +1 -1
- data/lib/rbs/parser_aux.rb +5 -0
- data/lib/rbs/resolver/constant_resolver.rb +2 -2
- data/lib/rbs/resolver/type_name_resolver.rb +124 -38
- data/lib/rbs/subtractor.rb +3 -1
- data/lib/rbs/test/type_check.rb +14 -0
- data/lib/rbs/types.rb +3 -1
- data/lib/rbs/version.rb +1 -1
- data/lib/rbs.rb +1 -1
- data/lib/rdoc/discover.rb +1 -1
- data/lib/rdoc_plugin/parser.rb +3 -3
- data/rbs.gemspec +1 -0
- data/sig/annotate/formatter.rbs +2 -2
- data/sig/annotate/rdoc_annotater.rbs +1 -1
- data/sig/environment.rbs +57 -6
- data/sig/manifest.yaml +0 -1
- data/sig/parser.rbs +20 -0
- data/sig/resolver/type_name_resolver.rbs +38 -7
- data/sig/types.rbs +4 -1
- data/src/ast.c +1256 -0
- data/src/lexer.c +2956 -0
- data/src/lexer.re +147 -0
- data/src/lexstate.c +205 -0
- data/src/location.c +71 -0
- data/src/parser.c +3507 -0
- data/src/string.c +41 -0
- data/src/util/rbs_allocator.c +165 -0
- data/src/util/rbs_assert.c +19 -0
- data/src/util/rbs_buffer.c +54 -0
- data/src/util/rbs_constant_pool.c +18 -88
- data/src/util/rbs_encoding.c +21308 -0
- data/src/util/rbs_unescape.c +167 -0
- data/stdlib/bigdecimal/0/big_decimal.rbs +100 -82
- data/stdlib/bigdecimal-math/0/big_math.rbs +169 -8
- data/stdlib/cgi/0/core.rbs +9 -393
- data/stdlib/cgi/0/manifest.yaml +1 -0
- data/stdlib/cgi-escape/0/escape.rbs +171 -0
- data/stdlib/coverage/0/coverage.rbs +3 -1
- data/stdlib/date/0/date.rbs +67 -59
- data/stdlib/date/0/date_time.rbs +1 -1
- data/stdlib/delegate/0/delegator.rbs +10 -7
- data/stdlib/erb/0/erb.rbs +737 -347
- data/stdlib/fileutils/0/fileutils.rbs +18 -13
- data/stdlib/forwardable/0/forwardable.rbs +3 -0
- data/stdlib/json/0/json.rbs +68 -48
- data/stdlib/net-http/0/net-http.rbs +3 -0
- data/stdlib/objspace/0/objspace.rbs +9 -4
- data/stdlib/open-uri/0/open-uri.rbs +40 -0
- data/stdlib/openssl/0/openssl.rbs +331 -228
- data/stdlib/optparse/0/optparse.rbs +3 -3
- data/stdlib/pathname/0/pathname.rbs +9 -1379
- data/stdlib/psych/0/psych.rbs +3 -3
- data/stdlib/rdoc/0/code_object.rbs +2 -2
- data/stdlib/rdoc/0/comment.rbs +2 -0
- data/stdlib/rdoc/0/options.rbs +76 -0
- data/stdlib/rdoc/0/rdoc.rbs +7 -5
- data/stdlib/rdoc/0/store.rbs +1 -1
- data/stdlib/resolv/0/resolv.rbs +25 -68
- data/stdlib/ripper/0/ripper.rbs +5 -2
- data/stdlib/singleton/0/singleton.rbs +3 -0
- data/stdlib/socket/0/socket.rbs +13 -1
- data/stdlib/socket/0/tcp_socket.rbs +10 -2
- data/stdlib/stringio/0/stringio.rbs +1176 -85
- data/stdlib/strscan/0/string_scanner.rbs +31 -31
- data/stdlib/tempfile/0/tempfile.rbs +3 -3
- data/stdlib/time/0/time.rbs +1 -1
- data/stdlib/timeout/0/timeout.rbs +63 -7
- data/stdlib/tsort/0/cyclic.rbs +3 -0
- data/stdlib/uri/0/common.rbs +11 -2
- data/stdlib/uri/0/file.rbs +1 -1
- data/stdlib/uri/0/generic.rbs +17 -16
- data/stdlib/uri/0/rfc2396_parser.rbs +6 -7
- data/stdlib/zlib/0/zstream.rbs +1 -0
- metadata +57 -17
- data/ext/rbs_extension/lexer.c +0 -2728
- data/ext/rbs_extension/lexer.h +0 -179
- data/ext/rbs_extension/lexer.re +0 -147
- data/ext/rbs_extension/lexstate.c +0 -175
- data/ext/rbs_extension/location.c +0 -325
- data/ext/rbs_extension/location.h +0 -85
- data/ext/rbs_extension/parser.c +0 -2982
- data/ext/rbs_extension/parser.h +0 -18
- data/ext/rbs_extension/parserstate.c +0 -411
- data/ext/rbs_extension/parserstate.h +0 -163
- data/ext/rbs_extension/unescape.c +0 -32
- data/include/rbs/ruby_objs.h +0 -72
- data/src/constants.c +0 -153
- data/src/ruby_objs.c +0 -799
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 625eb3f7213f91b7ded108fcb35f84120cdf30f269dd2db324ca88da0b82f79a
|
|
4
|
+
data.tar.gz: 5efcce6237bd7e9135916d67c32746f72e319fa0c6ae2abeeda6173cf9f4786f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 895df7b19ee64fcf71291cd06e5487c3e87e30fbdaae13b0ba970dba0c3544d8bedbeef08775e46efe224a0d923393520f9efd0b0b8144dd4bf73230114eb6b7
|
|
7
|
+
data.tar.gz: d533dfbc071c697297670af31c3d28482f9db46948b3f94404b7797552e981922b82d7ca34da5501c49f0501d51d079706e4c1b0f660ce248babc70dcec5215b
|
data/.clang-format
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
Language: Cpp
|
|
3
|
+
|
|
4
|
+
# Indentation
|
|
5
|
+
UseTab: Never
|
|
6
|
+
IndentWidth: 4
|
|
7
|
+
BreakBeforeBraces: Attach
|
|
8
|
+
IndentCaseLabels: false
|
|
9
|
+
NamespaceIndentation: None
|
|
10
|
+
ContinuationIndentWidth: 4
|
|
11
|
+
IndentPPDirectives: None
|
|
12
|
+
IndentWrappedFunctionNames: false
|
|
13
|
+
AccessModifierOffset: -2
|
|
14
|
+
|
|
15
|
+
# Alignment
|
|
16
|
+
AlignAfterOpenBracket: BlockIndent
|
|
17
|
+
AlignConsecutiveAssignments: false
|
|
18
|
+
AlignConsecutiveDeclarations: false
|
|
19
|
+
AlignConsecutiveMacros: false
|
|
20
|
+
AlignEscapedNewlines: Left
|
|
21
|
+
AlignOperands: false
|
|
22
|
+
AlignTrailingComments: true
|
|
23
|
+
DerivePointerAlignment: false
|
|
24
|
+
PointerAlignment: Right
|
|
25
|
+
|
|
26
|
+
# Function calls formatting
|
|
27
|
+
BinPackArguments: false
|
|
28
|
+
BinPackParameters: false
|
|
29
|
+
AllowAllArgumentsOnNextLine: false
|
|
30
|
+
ExperimentalAutoDetectBinPacking: false
|
|
31
|
+
PenaltyBreakBeforeFirstCallParameter: 1
|
|
32
|
+
AlwaysBreakAfterDefinitionReturnType: None
|
|
33
|
+
|
|
34
|
+
# Wrapping and Breaking
|
|
35
|
+
ColumnLimit: 0
|
|
36
|
+
AllowShortBlocksOnASingleLine: Never
|
|
37
|
+
AllowShortCaseLabelsOnASingleLine: false
|
|
38
|
+
AllowShortFunctionsOnASingleLine: All
|
|
39
|
+
AllowShortIfStatementsOnASingleLine: Always
|
|
40
|
+
AllowShortLoopsOnASingleLine: false
|
|
41
|
+
AlwaysBreakAfterReturnType: None
|
|
42
|
+
AlwaysBreakBeforeMultilineStrings: false
|
|
43
|
+
AlwaysBreakTemplateDeclarations: No
|
|
44
|
+
BreakBeforeBinaryOperators: None
|
|
45
|
+
BreakBeforeTernaryOperators: false
|
|
46
|
+
BreakConstructorInitializers: BeforeColon
|
|
47
|
+
BreakInheritanceList: BeforeColon
|
|
48
|
+
BreakStringLiterals: false
|
|
49
|
+
CompactNamespaces: false
|
|
50
|
+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
|
51
|
+
Cpp11BracedListStyle: false
|
|
52
|
+
ReflowComments: false
|
|
53
|
+
SortIncludes: Never
|
|
54
|
+
|
|
55
|
+
# Spaces
|
|
56
|
+
SpaceAfterCStyleCast: true
|
|
57
|
+
SpaceAfterLogicalNot: false
|
|
58
|
+
SpaceAfterTemplateKeyword: true
|
|
59
|
+
SpaceBeforeAssignmentOperators: true
|
|
60
|
+
SpaceBeforeCpp11BracedList: true
|
|
61
|
+
SpaceBeforeCtorInitializerColon: true
|
|
62
|
+
SpaceBeforeInheritanceColon: true
|
|
63
|
+
SpaceBeforeParens: ControlStatements
|
|
64
|
+
SpaceBeforeRangeBasedForLoopColon: true
|
|
65
|
+
SpaceBeforeSquareBrackets: false
|
|
66
|
+
SpaceInEmptyBlock: false
|
|
67
|
+
SpaceInEmptyParentheses: false
|
|
68
|
+
SpacesBeforeTrailingComments: 1
|
|
69
|
+
SpacesInAngles: false
|
|
70
|
+
SpacesInCStyleCastParentheses: false
|
|
71
|
+
SpacesInConditionalStatement: false
|
|
72
|
+
SpacesInContainerLiterals: true
|
|
73
|
+
SpacesInParentheses: false
|
|
74
|
+
SpacesInSquareBrackets: false
|
data/.clangd
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: C Code Generation and Formatting Check
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request: {}
|
|
6
|
+
merge_group: {}
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
format-check:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- uses: ruby/setup-ruby@v1
|
|
14
|
+
with:
|
|
15
|
+
ruby-version: "4.0"
|
|
16
|
+
bundler-cache: none
|
|
17
|
+
- name: Set working directory as safe
|
|
18
|
+
run: git config --global --add safe.directory $(pwd)
|
|
19
|
+
- name: Install dependencies
|
|
20
|
+
run: |
|
|
21
|
+
sudo apt-get update
|
|
22
|
+
sudo apt-get install -y libdb-dev curl autoconf automake m4 libtool
|
|
23
|
+
- name: Install clang-format from LLVM
|
|
24
|
+
run: |
|
|
25
|
+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
|
26
|
+
sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-20 main"
|
|
27
|
+
sudo apt-get update
|
|
28
|
+
sudo apt-get install -y clang-format-20
|
|
29
|
+
sudo ln -sf /usr/bin/clang-format-20 /usr/local/bin/clang-format
|
|
30
|
+
clang-format --version
|
|
31
|
+
- name: Count processors
|
|
32
|
+
run: nproc
|
|
33
|
+
- name: Install Re2c
|
|
34
|
+
run: |
|
|
35
|
+
cd /tmp
|
|
36
|
+
curl -L https://github.com/skvadrik/re2c/archive/refs/tags/4.3.tar.gz > re2c-4.3.tar.gz
|
|
37
|
+
tar xf re2c-4.3.tar.gz
|
|
38
|
+
cd re2c-4.3
|
|
39
|
+
autoreconf -i -W all
|
|
40
|
+
./configure
|
|
41
|
+
make -j"$(nproc)" -l"$(nproc)"
|
|
42
|
+
sudo make install
|
|
43
|
+
- name: Update rubygems & bundler
|
|
44
|
+
run: |
|
|
45
|
+
ruby -v
|
|
46
|
+
gem update --system
|
|
47
|
+
- name: install erb
|
|
48
|
+
run: gem install erb
|
|
49
|
+
- name: bin/setup
|
|
50
|
+
run: |
|
|
51
|
+
bin/setup
|
|
52
|
+
- name: Check C code generation and formatting
|
|
53
|
+
run: |
|
|
54
|
+
clang-format --version
|
|
55
|
+
bundle exec rake lexer templates compile confirm_lexer confirm_templates
|
|
56
|
+
bundle exec rake format:c_check
|
|
@@ -11,12 +11,12 @@ jobs:
|
|
|
11
11
|
comments:
|
|
12
12
|
runs-on: "ubuntu-latest"
|
|
13
13
|
# env:
|
|
14
|
-
# RUBY_COMMIT:
|
|
14
|
+
# RUBY_COMMIT: v4.0.0-preview2
|
|
15
15
|
steps:
|
|
16
16
|
- uses: actions/checkout@v4
|
|
17
17
|
- uses: ruby/setup-ruby@v1
|
|
18
18
|
with:
|
|
19
|
-
ruby-version: "
|
|
19
|
+
ruby-version: "4.0.0"
|
|
20
20
|
bundler: none
|
|
21
21
|
- name: Install dependencies
|
|
22
22
|
run: |
|
|
@@ -26,6 +26,8 @@ jobs:
|
|
|
26
26
|
run: |
|
|
27
27
|
ruby -v
|
|
28
28
|
gem update --system
|
|
29
|
+
- name: install erb
|
|
30
|
+
run: gem install erb
|
|
29
31
|
- name: bin/setup
|
|
30
32
|
run: |
|
|
31
33
|
bin/setup
|
data/.github/workflows/ruby.yml
CHANGED
|
@@ -13,26 +13,24 @@ jobs:
|
|
|
13
13
|
strategy:
|
|
14
14
|
fail-fast: false
|
|
15
15
|
matrix:
|
|
16
|
-
ruby: ['3.
|
|
16
|
+
ruby: ['3.2', '3.3', '3.4', '4.0', head]
|
|
17
17
|
rubyopt: [""]
|
|
18
18
|
job:
|
|
19
19
|
- test
|
|
20
20
|
include:
|
|
21
21
|
- ruby: head
|
|
22
22
|
job: stdlib_test rubocop
|
|
23
|
-
- ruby: "
|
|
23
|
+
- ruby: "4.0"
|
|
24
24
|
job: stdlib_test
|
|
25
|
-
- ruby: "
|
|
25
|
+
- ruby: "4.0"
|
|
26
26
|
job: test
|
|
27
27
|
rubyopt: "--enable-frozen-string-literal"
|
|
28
|
-
- ruby: "
|
|
28
|
+
- ruby: "4.0"
|
|
29
29
|
job: stdlib_test
|
|
30
30
|
rubyopt: "--enable-frozen-string-literal"
|
|
31
|
-
- ruby: "
|
|
32
|
-
job: lexer templates compile confirm_lexer confirm_templates
|
|
33
|
-
- ruby: "3.4"
|
|
31
|
+
- ruby: "4.0"
|
|
34
32
|
job: rubocop validate test_doc build test_generate_stdlib raap
|
|
35
|
-
- ruby: "
|
|
33
|
+
- ruby: "4.0"
|
|
36
34
|
job: typecheck_test
|
|
37
35
|
env:
|
|
38
36
|
RANDOMIZE_STDLIB_TEST_ORDER: "true"
|
|
@@ -48,21 +46,12 @@ jobs:
|
|
|
48
46
|
run: |
|
|
49
47
|
sudo apt-get update
|
|
50
48
|
sudo apt-get install -y libdb-dev curl autoconf automake m4 libtool python3
|
|
51
|
-
- name: Install Re2c
|
|
52
|
-
if: ${{ contains(matrix.job, 'lexer') }}
|
|
53
|
-
run: |
|
|
54
|
-
cd /tmp
|
|
55
|
-
curl -L https://github.com/skvadrik/re2c/archive/refs/tags/3.1.tar.gz > re2c-3.1.tar.gz
|
|
56
|
-
tar xf re2c-3.1.tar.gz
|
|
57
|
-
cd re2c-3.1
|
|
58
|
-
autoreconf -i -W all
|
|
59
|
-
./configure
|
|
60
|
-
make
|
|
61
|
-
sudo make install
|
|
62
49
|
- name: Update rubygems & bundler
|
|
63
50
|
run: |
|
|
64
51
|
ruby -v
|
|
65
52
|
gem update --system
|
|
53
|
+
- name: install erb
|
|
54
|
+
run: gem install erb
|
|
66
55
|
- name: bundle config set with
|
|
67
56
|
run: |
|
|
68
57
|
echo "NO_MINITEST=true" >> $GITHUB_ENV
|
|
@@ -102,3 +91,32 @@ jobs:
|
|
|
102
91
|
- run: bundle exec rake test:valgrind
|
|
103
92
|
env:
|
|
104
93
|
RUBY_FREE_AT_EXIT: 1
|
|
94
|
+
C99_compile:
|
|
95
|
+
runs-on: macos-latest
|
|
96
|
+
strategy:
|
|
97
|
+
fail-fast: false
|
|
98
|
+
matrix:
|
|
99
|
+
ruby: ['4.0', head]
|
|
100
|
+
steps:
|
|
101
|
+
- uses: actions/checkout@v4
|
|
102
|
+
- name: Install dependencies
|
|
103
|
+
run: |
|
|
104
|
+
brew install ruby-build
|
|
105
|
+
- uses: ruby/setup-ruby@v1
|
|
106
|
+
with:
|
|
107
|
+
ruby-version: ${{ matrix.ruby }}
|
|
108
|
+
bundler: none
|
|
109
|
+
- name: Set working directory as safe
|
|
110
|
+
run: git config --global --add safe.directory $(pwd)
|
|
111
|
+
- name: Update rubygems & bundler
|
|
112
|
+
run: |
|
|
113
|
+
ruby -v
|
|
114
|
+
gem update --system
|
|
115
|
+
- name: install erb
|
|
116
|
+
run: gem install erb
|
|
117
|
+
- name: clang version
|
|
118
|
+
run: clang --version
|
|
119
|
+
- name: bin/setup
|
|
120
|
+
run: |
|
|
121
|
+
bin/setup
|
|
122
|
+
- run: bundle exec rake clean compile_c99
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,89 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 3.10.4 (2026-03-25)
|
|
4
|
+
|
|
5
|
+
### Library changes
|
|
6
|
+
|
|
7
|
+
#### rbs collection
|
|
8
|
+
|
|
9
|
+
* [Backport] [3.10] Fix: pathname not written to lockfile. ([#2896](https://github.com/ruby/rbs/pull/2896))
|
|
10
|
+
|
|
11
|
+
## 3.10.3 (2026-01-30)
|
|
12
|
+
|
|
13
|
+
This is a minor fix around the dependency to `tsort`.
|
|
14
|
+
|
|
15
|
+
## Pull Requests
|
|
16
|
+
|
|
17
|
+
* Merge pull request #2601 from ima1zumi/add-tsort-dep ([#2834](https://github.com/ruby/rbs/pull/2834))
|
|
18
|
+
|
|
19
|
+
## 3.10.2 (2026-01-07)
|
|
20
|
+
|
|
21
|
+
This is a minor fix on arena allocator alignment.
|
|
22
|
+
|
|
23
|
+
### Pull Requests
|
|
24
|
+
|
|
25
|
+
* Merge pull request #2788 from ruby/fix-alloc-alignment ([#2790](https://github.com/ruby/rbs/pull/2790))
|
|
26
|
+
|
|
27
|
+
## 3.10.1 (2026-01-07)
|
|
28
|
+
|
|
29
|
+
This is a follow-up release for Ruby 4.0.0 with documentation update based on Ruby 4.0.0, and bugfixes related to set/pathname library loading.
|
|
30
|
+
|
|
31
|
+
### Pull Requests
|
|
32
|
+
|
|
33
|
+
* Merge pull request #2777 from ksss/pathname-ext ([#2786](https://github.com/ruby/rbs/pull/2786))
|
|
34
|
+
* Ruby 4.0.0 backports ([#2785](https://github.com/ruby/rbs/pull/2785))
|
|
35
|
+
* [Backport] Fix subtraction of civar ([#2783](https://github.com/ruby/rbs/pull/2783))
|
|
36
|
+
* [Backport] Update ruby to 4.0 ([#2778](https://github.com/ruby/rbs/pull/2778))
|
|
37
|
+
|
|
38
|
+
## 3.10.0 (2025-12-23)
|
|
39
|
+
|
|
40
|
+
RBS 3.10.0 ships with a pure C parser implementation, signature updates for Ruby 4.0, and various bug fixes.
|
|
41
|
+
|
|
42
|
+
### Pure C parser implementation
|
|
43
|
+
|
|
44
|
+
The new parser implementation was announced at [RubyKaigi 2025](https://rubykaigi.org/2025/presentations/amomchilov.html) and is finally shipped as a RubyGem!
|
|
45
|
+
|
|
46
|
+
The new parser is faster than the one in 3.9 and is portable — it is independent of the Ruby runtime and is used to implement Sorbet’s RBS support.
|
|
47
|
+
|
|
48
|
+
### Type definition of bundled gems
|
|
49
|
+
|
|
50
|
+
The type definitions of `cgi` have been moved to [gem_rbs_collection](https://github.com/ruby/gem_rbs_collection/tree/main/gems/cgi), as it has been migrated to a bundled gem in Ruby 4.0
|
|
51
|
+
|
|
52
|
+
`cgi-escape` has been added to `stdlib`. You may need to declare a dependency on `cgi-escape` in your `manifest.yaml`, add `-r cgi-escape` to your command line, or update your type checker configuration.
|
|
53
|
+
|
|
54
|
+
```yaml
|
|
55
|
+
dependencies:
|
|
56
|
+
- name: cgi-escape
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
The type definitions for `pathname` have also been moved from `stdlib` to `core`, as it is now implemented as part of the core library.
|
|
60
|
+
|
|
61
|
+
### Pull Requests
|
|
62
|
+
|
|
63
|
+
* [Backport] Support rdoc v7 ([#2770](https://github.com/ruby/rbs/pull/2770))
|
|
64
|
+
* [Backport] Check tuple type length ([#2766](https://github.com/ruby/rbs/pull/2766))
|
|
65
|
+
* Backport update to 4.0.0-preview3 ([#2768](https://github.com/ruby/rbs/pull/2768))
|
|
66
|
+
* [Backport] Remove test code for bundled gems ([#2762](https://github.com/ruby/rbs/pull/2762))
|
|
67
|
+
* Merge pull request #2761 from ruby/update-minitest ([#2763](https://github.com/ruby/rbs/pull/2763))
|
|
68
|
+
* [Backport] Support BigDecimal v4 ([#2759](https://github.com/ruby/rbs/pull/2759))
|
|
69
|
+
* Parser/lexer backports ([#2756](https://github.com/ruby/rbs/pull/2756))
|
|
70
|
+
* Merge pull request #2753 from ruby/delete-printf ([#2754](https://github.com/ruby/rbs/pull/2754))
|
|
71
|
+
* Backports ([#2751](https://github.com/ruby/rbs/pull/2751))
|
|
72
|
+
* Merge pull request #2728 from ruby/cgi ([#2747](https://github.com/ruby/rbs/pull/2747))
|
|
73
|
+
* Merge pull request #2729 from ruby/rbs-assert ([#2748](https://github.com/ruby/rbs/pull/2748))
|
|
74
|
+
* Merge pull request #2749 from ruby/fix-test ([#2750](https://github.com/ruby/rbs/pull/2750))
|
|
75
|
+
* Backport RBS file updates ([#2742](https://github.com/ruby/rbs/pull/2742))
|
|
76
|
+
* Backport JSON PRs ([#2740](https://github.com/ruby/rbs/pull/2740))
|
|
77
|
+
* Merge pull request #2718 from ruby/ruby-4 ([#2741](https://github.com/ruby/rbs/pull/2741))
|
|
78
|
+
* [Backport] Move Pathname to core from stdlib ([#2730](https://github.com/ruby/rbs/pull/2730))
|
|
79
|
+
* Backport rdoc 6.16 ([#2722](https://github.com/ruby/rbs/pull/2722))
|
|
80
|
+
* Backport rdoc support ([#2719](https://github.com/ruby/rbs/pull/2719))
|
|
81
|
+
* Backport "Remove sig for IO#{ready?,nread}" ([#2720](https://github.com/ruby/rbs/pull/2720))
|
|
82
|
+
* Backport more pure C parsers ([#2679](https://github.com/ruby/rbs/pull/2679))
|
|
83
|
+
* Backport module name normalization ([#2673](https://github.com/ruby/rbs/pull/2673))
|
|
84
|
+
* Backport pure-C parser ([#2671](https://github.com/ruby/rbs/pull/2671))
|
|
85
|
+
* Fix test failure ([#2672](https://github.com/ruby/rbs/pull/2672))
|
|
86
|
+
|
|
3
87
|
## 3.9.5 (2025-09-08)
|
|
4
88
|
|
|
5
89
|
### Signature updates
|
data/README.md
CHANGED
|
@@ -141,7 +141,7 @@ require "rbs"
|
|
|
141
141
|
loader = RBS::EnvironmentLoader.new()
|
|
142
142
|
|
|
143
143
|
# loader.add(path: Pathname("sig")) # Load .rbs files from `sig` directory
|
|
144
|
-
# loader.add(library: "
|
|
144
|
+
# loader.add(library: "logger") # Load logger library
|
|
145
145
|
|
|
146
146
|
environment = RBS::Environment.from_loader(loader).resolve_type_names
|
|
147
147
|
|
|
@@ -198,6 +198,43 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|
|
198
198
|
|
|
199
199
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
200
200
|
|
|
201
|
+
### C Code Formatting
|
|
202
|
+
|
|
203
|
+
This project uses `clang-format` to enforce consistent formatting of C code with a `.clang-format` configuration in the root directory.
|
|
204
|
+
|
|
205
|
+
#### Setup
|
|
206
|
+
|
|
207
|
+
First, install clang-format:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
# macOS
|
|
211
|
+
brew install clang-format
|
|
212
|
+
|
|
213
|
+
# Ubuntu/Debian
|
|
214
|
+
sudo apt-get install clang-format
|
|
215
|
+
|
|
216
|
+
# Windows
|
|
217
|
+
choco install llvm
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
#### Usage
|
|
221
|
+
|
|
222
|
+
Format all C source files:
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
rake format:c
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Check formatting without making changes:
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
rake format:c_check
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
#### Editor Integration
|
|
235
|
+
|
|
236
|
+
For VS Code users, install the "clangd" extension which will automatically use the project's `.clang-format` file.
|
|
237
|
+
|
|
201
238
|
## Contributing
|
|
202
239
|
|
|
203
240
|
Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/rbs.
|