candor 0.2.1 → 0.3.0
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 +9 -2
- data/README.md +4 -5
- data/candor.gemspec +1 -1
- data/lib/candor/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0dff88c7b13476b57de0595389deb4323892303938997b9efb7a6b15fa25d27e
|
|
4
|
+
data.tar.gz: 9764a01e552d1495f3c23b6decff65ddb22e1f0ace5fd9309563cc89cb7cd73a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 63307d1909064c401480dc8dde0a255069dd79ac545f5aeb4d6760608debe6fe10f480a68deadb06cdf86cc8a77e7631b6445cd59d77686314301daa4f5797ab
|
|
7
|
+
data.tar.gz: 0713713d5d03034c5fdcda76db29c78329e62650633dfc9632d75eabc6b45792506d26d84315ca3e4b1bd136c3eedbf4f0f01ba9fb385ddc343c43741f2f315a
|
data/CHANGELOG.md
CHANGED
|
@@ -6,11 +6,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.3.0] - 2026-10-06
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- Ruby 3.3 or newer is now required. Ruby 3.2 is no longer supported.
|
|
13
|
+
- Update all development dependencies and Bundler to their latest stable releases.
|
|
14
|
+
|
|
9
15
|
## [0.2.1] - 2026-07-31
|
|
10
16
|
|
|
11
17
|
No change to the library.
|
|
12
18
|
|
|
13
|
-
The gem now ships from a tagged CI run through RubyGems trusted publishing. This release and every later one carries a sigstore attestation
|
|
19
|
+
The gem now ships from a tagged CI run through RubyGems trusted publishing. This release and every later one carries a sigstore attestation, which rubygems.org serves at `https://rubygems.org/api/v1/attestations/candor-0.2.1.json`.
|
|
14
20
|
|
|
15
21
|
## [0.2.0] - 2026-07-10
|
|
16
22
|
|
|
@@ -27,7 +33,8 @@ The gem now ships from a tagged CI run through RubyGems trusted publishing. This
|
|
|
27
33
|
- Fabrication is thread-safe through one global `Monitor`; call-time dispatch takes no lock and never needs one. Re-fabricating a name overwrites the wrapper and the body in place, so it is warning-free under `ruby -w`, leaves no orphaned body, and a concurrent caller sees the old method or the new one, never a `NoMethodError`. A frozen target, an unbindable `Method`/`UnboundMethod` body, a name under the reserved `Candor::BODY_PREFIX`, an uncallable `via:` and a malformed `parameters:` all raise before the target is touched.
|
|
28
34
|
- `sig/` ships RBS for the public API: `Candor.define`, `Candor.body_name`, `BODY_PREFIX`, and `Candor::Signature` with `KINDS` and `KEYWORD_BRANCH_LIMIT`. Everything else is `private_constant`, which RBS cannot express and therefore does not declare.
|
|
29
35
|
|
|
30
|
-
[Unreleased]: https://github.com/svyatov/candor/compare/v0.
|
|
36
|
+
[Unreleased]: https://github.com/svyatov/candor/compare/v0.3.0...HEAD
|
|
37
|
+
[0.3.0]: https://github.com/svyatov/candor/compare/v0.2.1...v0.3.0
|
|
31
38
|
[0.2.1]: https://github.com/svyatov/candor/releases/tag/v0.2.1
|
|
32
39
|
[0.2.0]: https://github.com/svyatov/candor/releases/tag/v0.2.0
|
|
33
40
|
[0.1.0]: https://github.com/svyatov/candor/releases/tag/v0.1.0
|
data/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Turn a block or a callable into a real Ruby method that reports the body's own arity, parameters and
|
|
4
4
|
source location.
|
|
5
5
|
|
|
6
|
-
- **Zero runtime dependencies.** Ruby 3.
|
|
6
|
+
- **Zero runtime dependencies.** Ruby 3.3 or newer and nothing else. Tested on 3.3, 3.4, 4.0 and
|
|
7
7
|
`ruby-head`.
|
|
8
8
|
- **Every shape Ruby can express.** All eight parameter kinds wrap at full fidelity, including `end:`,
|
|
9
9
|
`it`, `_1`, `**nil` and destructuring. There is no degraded fallback.
|
|
@@ -146,10 +146,9 @@ to capture it and one to re-splat it into the body, on any wrapper you could wri
|
|
|
146
146
|
none of its own, because past the branch limit the captured keyrest *is* the Hash the keywords accumulate
|
|
147
147
|
into.
|
|
148
148
|
|
|
149
|
-
Exactly as stated from **Ruby 3.4**.
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
and no call that carries no keyword ever allocates, on any supported Ruby.
|
|
149
|
+
Exactly as stated from **Ruby 3.4**. On Ruby 3.3, passing a splatted `**hash` into a
|
|
150
|
+
`define_method`-created method costs one extra Hash, so the hashed path allocates one more object.
|
|
151
|
+
Nothing in the gem can reach that, and no call that carries no keyword ever allocates, on any supported Ruby.
|
|
153
152
|
|
|
154
153
|
**Thread safety.** Fabrication takes one global `Monitor`; concurrent `Candor.define` calls
|
|
155
154
|
serialize. Call-time dispatch takes no lock at all, and never needs one: re-fabrication replaces a
|
data/candor.gemspec
CHANGED
|
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
|
|
|
16
16
|
spec.homepage = "https://github.com/svyatov/candor"
|
|
17
17
|
spec.license = "MIT"
|
|
18
18
|
|
|
19
|
-
spec.required_ruby_version = ">= 3.
|
|
19
|
+
spec.required_ruby_version = ">= 3.3.0"
|
|
20
20
|
|
|
21
21
|
spec.require_paths = ["lib"]
|
|
22
22
|
spec.files = Dir["lib/**/*.rb"] + Dir["sig/**/*"] +
|
data/lib/candor/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: candor
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Leonid Svyatov
|
|
@@ -45,14 +45,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
45
45
|
requirements:
|
|
46
46
|
- - ">="
|
|
47
47
|
- !ruby/object:Gem::Version
|
|
48
|
-
version: 3.
|
|
48
|
+
version: 3.3.0
|
|
49
49
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
50
50
|
requirements:
|
|
51
51
|
- - ">="
|
|
52
52
|
- !ruby/object:Gem::Version
|
|
53
53
|
version: '0'
|
|
54
54
|
requirements: []
|
|
55
|
-
rubygems_version: 4.0.
|
|
55
|
+
rubygems_version: 4.0.20
|
|
56
56
|
specification_version: 4
|
|
57
57
|
summary: Turn a block or a callable into a real Ruby method that reports the body's
|
|
58
58
|
own arity, parameters and source location.
|