rbs 3.9.0.pre.1 → 3.9.0.pre.2
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/CHANGELOG.md +12 -0
- data/core/hash.rbs +2 -2
- data/core/kernel.rbs +1 -1
- data/core/module.rbs +2 -2
- data/ext/rbs_extension/parser.c +7 -7
- data/lib/rbs/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4c12dc48aff1dbea42a5a3b744a3f4c60ec4636ff31254abbba54edff3b3e1d
|
4
|
+
data.tar.gz: 69aa96a394191b63d825071352e35221534925980e13001e83dce553efa458d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0875e68b5e75f08901125ae81e186979822fb6eca9e50bac68bcd78b7b379b004407c490833a885ed6d931353b3f53dd5509a854c57781659cc9f2c78bff6843'
|
7
|
+
data.tar.gz: 7fbc423409626a355aebc89d4c7dfd99bb81b3e522f3e443f43448b145508f367bab2d68d432aa4248e5029640b61ac79ab55af489f01f9249a0d5c30affa108
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 3.9.0.pre.2 (2025-03-14)
|
4
|
+
|
5
|
+
### Signature updates
|
6
|
+
|
7
|
+
* `Hash.new` type ([#2323](https://github.com/ruby/rbs/pull/2323))
|
8
|
+
* `Module#define_method` ([#2325](https://github.com/ruby/rbs/pull/2325))
|
9
|
+
* `Object#define_singleton_method` ([#2324](https://github.com/ruby/rbs/pull/2324))
|
10
|
+
|
11
|
+
### Language updates
|
12
|
+
|
13
|
+
* Fix `define_method` method block self type ([#2325](https://github.com/ruby/rbs/pull/2325))
|
14
|
+
|
3
15
|
## 3.9.0.pre.1 (2025-03-11)
|
4
16
|
|
5
17
|
### Signature updates
|
data/core/hash.rbs
CHANGED
@@ -1845,8 +1845,8 @@ class Hash[unchecked out K, unchecked out V] < Object
|
|
1845
1845
|
# be resized.
|
1846
1846
|
#
|
1847
1847
|
def initialize: (?capacity: int) -> void
|
1848
|
-
|
|
1849
|
-
|
|
1848
|
+
| (V default, ?capacity: int) -> void
|
1849
|
+
| (?capacity: int) { (Hash[K, V] hash, K key) -> V } -> void
|
1850
1850
|
|
1851
1851
|
# <!--
|
1852
1852
|
# rdoc-file=hash.c
|
data/core/kernel.rbs
CHANGED
@@ -2297,7 +2297,7 @@ module Kernel : BasicObject
|
|
2297
2297
|
# chris.greet("Hi") #=> "Hi, I'm Chris!"
|
2298
2298
|
#
|
2299
2299
|
def define_singleton_method: (interned name, Method | UnboundMethod | Proc method) -> Symbol
|
2300
|
-
| (interned name) { (?) -> untyped } -> Symbol
|
2300
|
+
| (interned name) { (?) [self: self] -> untyped } -> Symbol
|
2301
2301
|
|
2302
2302
|
# <!--
|
2303
2303
|
# rdoc-file=io.c
|
data/core/module.rbs
CHANGED
@@ -731,8 +731,8 @@ class Module < Object
|
|
731
731
|
# I'm Dino!
|
732
732
|
# #<B:0x401b39e8>
|
733
733
|
#
|
734
|
-
def define_method: (interned symbol, ^() [self:
|
735
|
-
| (interned symbol) { () [self:
|
734
|
+
def define_method: (interned symbol, ^(?) [self: top] -> untyped | Method | UnboundMethod method) -> Symbol
|
735
|
+
| (interned symbol) { (?) [self: top] -> untyped } -> Symbol
|
736
736
|
|
737
737
|
# <!--
|
738
738
|
# rdoc-file=object.c
|
data/ext/rbs_extension/parser.c
CHANGED
@@ -661,16 +661,16 @@ static void parse_function(parserstate *state, VALUE *function, VALUE *block, VA
|
|
661
661
|
parser_advance_assert(state, pRPAREN);
|
662
662
|
}
|
663
663
|
|
664
|
-
// Untyped method parameter means it cannot have block
|
665
|
-
if (rbs_is_untyped_params(¶ms)) {
|
666
|
-
if (state->next_token.type != pARROW) {
|
667
|
-
raise_syntax_error(state, state->next_token2, "A method type with untyped method parameter cannot have block");
|
668
|
-
}
|
669
|
-
}
|
670
|
-
|
671
664
|
// Passing NULL to function_self_type means the function itself doesn't accept self type binding. (== method type)
|
672
665
|
if (function_self_type) {
|
673
666
|
*function_self_type = parse_self_type_binding(state);
|
667
|
+
} else {
|
668
|
+
// Parsing method type. untyped_params means it cannot have a block
|
669
|
+
if (rbs_is_untyped_params(¶ms)) {
|
670
|
+
if (state->next_token.type != pARROW) {
|
671
|
+
raise_syntax_error(state, state->next_token2, "A method type with untyped method parameter cannot have block");
|
672
|
+
}
|
673
|
+
}
|
674
674
|
}
|
675
675
|
|
676
676
|
VALUE required = Qtrue;
|
data/lib/rbs/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.9.0.pre.
|
4
|
+
version: 3.9.0.pre.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Soutaro Matsumoto
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-03-
|
10
|
+
date: 2025-03-14 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: logger
|