Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use require_relative() for "prototype runtime --require-relative" #299

Merged
merged 1 commit into from
Jun 10, 2020

Conversation

tadd
Copy link
Contributor

@tadd tadd commented Jun 9, 2020

As of now, rbs prototype runtime --require-relative is identical with ... --require because it uses require(), not require_relative().

This PR changes --require-relative to use require_relative().

With this change, the below command works as expected with local rails application.

bundle exec rbs prototype runtime --require-relative config/environment ModelName

(Note: I needed to add Rails.application.eager_load! to environment.rb for proper recognition of classes)

Copy link
Member

@soutaro soutaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@soutaro soutaro merged commit 76f6b9e into ruby:master Jun 10, 2020
@tadd tadd deleted the use-require-relative-on-prototype-runtime branch June 14, 2020 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants