Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tags: sorbet/sorbet

Tags

0.6.12656.20251022164247-fb4fe38c4

Toggle 0.6.12656.20251022164247-fb4fe38c4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
delete `AT_LEAST_RUBY_2_7` checks (#9489)

0.6.12655.20251022124514-04568a2dd

Toggle 0.6.12655.20251022124514-04568a2dd's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add support for RSpec `its` test DSL (#9435)

* Add support for RSpec `its` test DSL

* Add test with T.reveal_type

* attempt to fix

* Fix typing of subject

* write better tests

* try it for real

* fix bad change

* also support string args

* Revert "also support string args"

This reverts commit 4ff0bbc.

* remove comment

* Update rewriter/Minitest.cc

Co-authored-by: Jake Zimmerman <[email protected]>

* Update rewriter/Minitest.cc

Co-authored-by: Jake Zimmerman <[email protected]>

* convert send-> to send.

* Update rewriter/Minitest.cc

Co-authored-by: Jake Zimmerman <[email protected]>

* test for string arg and fix send->

* use generate_names.cc

* Move IsExpectedTransformer to anonymous namespace

Per code review feedback, moved IsExpectedTransformer class from
being defined inline in the its() case to the top-level anonymous
namespace block in the file, following the existing pattern used
by ConstantMover.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Committed-By-Agent: claude

* Fix misleading comments in its() case

Updated comments to accurately reflect what the code does:
- We're creating a class, not a "describe block"
- The class body only contains the it method, not a subject method

The transformation in the its() DSL creates a nested class that
contains an it method which calls subject.attribute directly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Committed-By-Agent: claude

* remove comments

* Add test for constant hoisting in its() blocks

Following the pattern from d214650 which added ConstantMover support
for let and test_each blocks, this test demonstrates that constants
defined inside its() blocks are properly hoisted out.

The test shows:
- Constants (X = 1) are moved outside the it method definition
- They are replaced with Module.const_set calls inside the method
- The constant reference is transformed to use the hoisted constant

This verifies the ConstantMover.apply and addConstantsToExpression
calls on lines 717-718 and 725 are working correctly for its() blocks.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Committed-By-Agent: claude

---------

Co-authored-by: Jake Zimmerman <[email protected]>
Co-authored-by: Claude <[email protected]>

0.6.12654.20251022123820-6e0342fef

Toggle 0.6.12654.20251022123820-6e0342fef's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Inline name hash serialization (#9486)

* Move namesByHash into a struct

* Stop serializing the name hash

* Give names to bucket predicates

0.6.12653.20251022121005-4b75ddd63

Toggle 0.6.12653.20251022121005-4b75ddd63's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Direct Prism desugar of translateOpAssignment (all augmented assignme…

…nts) (#9308)

0.6.12652.20251021202248-3eeeb7aa0

Toggle 0.6.12652.20251021202248-3eeeb7aa0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix Kernel#p return type using type parameters (#9488)

- Updated Kernel#p signature to use type_parameters(:T) with Object upper bound
- Changed method definition from 'def p(*arg0)' to 'def p(arg0=nil, *arg1)'
  to support overloaded signatures
- Added three overloaded signatures:
  1. sig { returns(NilClass) } for p() with no arguments
  2. sig with single arg returning T.type_parameter(:T) for p(x)
  3. sig with multiple args returning T::Array[T.type_parameter(:T)] for p(x,y,...)
- Updated test expectations in test/testdata/rbi/kernel.rb
- Updated CFG test expectations in test/testdata/cfg/textoutput.rb.cfg-text.exp

The new signature correctly preserves argument types:
- p() returns NilClass
- p(42) returns Integer
- p('hello') returns String
- p(1, 2) returns T::Array[Integer]
- p(1, 'string') returns T::Array[T.any(Integer, String)]

All 2184 curated tests pass.

0.6.12651.20251020155103-8a0290f85

Toggle 0.6.12651.20251020155103-8a0290f85's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Directly Desugar PM_INDEX_TARGET_NODE (#9475)

0.6.12650.20251017065549-f491ad543

Toggle 0.6.12650.20251017065549-f491ad543's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Update OrdinaryParamDefined error message (#9444)

0.6.12649.20251016173128-27b93cc66

Toggle 0.6.12649.20251016173128-27b93cc66's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Directly Desugar PM_INSTANCE_VARIABLE_TARGET_NODE (#9474)

0.6.12648.20251016142819-f6aa4dc10

Toggle 0.6.12648.20251016142819-f6aa4dc10's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Only access node data from Prism tree (#9430)

0.6.12647.20251016141834-ed0f11c39

Toggle 0.6.12647.20251016141834-ed0f11c39's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Directly Desugar PM_CLASS_VARIABLE_TARGET_NODE (#9472)