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

Refactor compiled_source #46729

Merged
merged 1 commit into from
Dec 14, 2022
Merged

Conversation

eileencodes
Copy link
Member

This is a continuation of #46706 to make sure we don't need to set an instance variable to @original_source for the compile method to use.

We can't call strict_locals! after encode so we need to set it to a local variable in complile. We changed the strict_locals! method to check NONE instead of lazily defining instance variables which let us simplify strict_locals? to return the value of strict_locals!. This simplifies and clarifies the code.

Co-authored-by: Aaron Patterson tenderlove@ruby-lang.org

This is a continuation of rails#46706 to make sure we don't need to set an
instance variable to `@original_source` for the `compile` method to use.

We can't call `strict_locals!` after encode so we need to set it to a
local variable in `complile`. We changed the `strict_locals!` method to
check `NONE` instead of lazily defining instance variables which let us
simplify `strict_locals?` to return the value of `strict_locals!`. This
simplifies and clarifies the code.

Co-authored-by: Aaron Patterson tenderlove@ruby-lang.org
@rails-bot rails-bot bot added the actionview label Dec 14, 2022
@eileencodes eileencodes merged commit 4f7772a into rails:main Dec 14, 2022
@eileencodes eileencodes deleted the refactor-compiled_source branch December 14, 2022 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant