Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Aug 25, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.3)

Can you help keep this open source service alive? 💖 Please sponsor : )

hsbt and others added 11 commits August 25, 2025 17:40
```
Error: test_join(PathnameInstanceTest): NoMethodError: undefined method 'respond_to?' for an instance of RBS::UnitTest::Convertibles::ToStr
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/spy.rb:94:in 'Pathname#join'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/spy.rb:94:in 'block (2 levels) in wrapped_object'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:152:in 'block in RBS::UnitTest::TypeAssertions#send_setup'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'Kernel#catch'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'RBS::UnitTest::TypeAssertions#send_setup'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:172:in 'RBS::UnitTest::TypeAssertions#assert_send_type'
test/stdlib/Pathname_test.rb:389:in 'PathnameInstanceTest#test_join'
     386:                      Pathname('.'), :join, 'foo'
     387:     assert_send_type '(String, String) -> Pathname',
     388:                      Pathname('.'), :join, 'foo', 'bar'
  => 389:     assert_send_type '(ToStr) -> Pathname',
     390:                      Pathname('.'), :join, ToStr.new('foo')
     391:     assert_send_type '(Pathname) -> Pathname',
     392:                      Pathname('.'), :join, Pathname('foo')
```
With the recent changes to shapes and variables
`general_ivar_set` no longer make sense and is
just extra complexity.

Trying to have a unified logic for all 3 types of objects
made sense, but also made the code way more complex.

We should definitely try to share more code between the
3 paths though, but that can be done with functions like
`generic_shape_ivar`.
Now that the shape_id has been unified across all types
this helper function doesn't do much over `RBASIC_SET_SHAPE_ID`.

It still check if the write is needed, but it doesn't seem useful
in places where it's used.
@pull pull bot locked and limited conversation to collaborators Aug 25, 2025
@pull pull bot added the ⤵️ pull label Aug 25, 2025
@pull pull bot merged commit f1727b5 into turkdevops:master Aug 25, 2025
1 of 2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants