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 local_environment.rb methods #2388

Closed
hannahramadan opened this issue Jan 4, 2024 · 3 comments · Fixed by #2390
Closed

Refactor local_environment.rb methods #2388

hannahramadan opened this issue Jan 4, 2024 · 3 comments · Fixed by #2390
Assignees

Comments

@hannahramadan
Copy link
Contributor

Many of the methods inside lib/new_relic/local_environment.rb consist of a single if statement. Let's clean up these methods by doing an early return instead.

For example:

def check_for_falcon
-   if defined?(::Falcon::Server) && NewRelic::LanguageSupport.object_space_usable?
+   return unless defined?(::Falcon::Server) && NewRelic::LanguageSupport.object_space_usable?

  @discovered_dispatcher = :falcon if find_class_in_object_space(::Falcon::Server)
end
@workato-integration
Copy link

@fransan6
Copy link
Contributor

fransan6 commented Jan 6, 2024

Morning! I can give this a go if it's still an Issue?

@fallwith fallwith assigned fallwith and fransan6 and unassigned fallwith Jan 7, 2024
@fallwith
Copy link
Contributor

fallwith commented Jan 7, 2024

Morning! I can give this a go if it's still an Issue?

Hi @fransan6! Thanks very much for taking a look at this one. I've gone ahead and assigned it to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants