Shopify / Shopify/tapioca

Generated activesupport rbi does not include String#starts_with? & String#ends_with?

Open
#640 3 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
873
Forks
164
Avg merge
4d 27m
Merged PRs (30d)
9

Description

ActiveSupport implements starts/ends_with? methods as aliases on the String class.

When generating an rbi file via tapioca for activesupport, it doesn't generate the aliased methods in the rbi file.

https://github.com/rails/rails/blob/v6.0.4.1/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb

I did try to fix it by adding require 'active_support/core_ext/string' to my require.rb file, and running bin/tapioca gem --all but that didn't generate the missing methods either.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked ActiveSupport file, active_support/core_ext/string/starts_ends_with.rb, and reproduce the issue with bin/tapioca gem --all after requiring active_support/core_ext/string. Trace why the aliased String methods are absent from the generated RBI, then verify that the generated file includes starts_with? and ends_with?.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.